Please describe the behavior you are expecting
Building Nest Applications is not possible any more after upgrade to v8.8.0. It fails with the following error:
An unhandled exception occurred: license-webpack-plugin: Please specify a regular expression as the pattern property on the plugin options.
ng generate @nrwl/nest:application test-aping build --prod --project test-api@nrwl/angular : 8.8.0
@nrwl/cli : 8.8.0
@nrwl/cypress : 8.8.0
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : Not Found
@nrwl/jest : 8.8.0
@nrwl/linter : 8.8.0
@nrwl/nest : 8.8.0
@nrwl/next : Not Found
@nrwl/node : 8.8.0
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 8.8.0
@nrwl/web : Not Found
@nrwl/workspace : 8.8.0
typescript : 3.5.3
"@nestjs/common": "6.10.1",
"@nestjs/core": "6.10.1",
"@nestjs/platform-express": "6.10.1",
"@nestjs/platform-socket.io": "6.10.1",
"@nestjs/swagger": "3.1.0",
"@nestjs/websockets": "6.5.3",
"@nestjs/schematics": "6.7.0",
"@nestjs/testing": "6.8.3"
Node.js: v12.10.0
Here is a workaround, only if you don't care about extracting license files.
In your angular.json file, set extractLicenses to false in the production configuration section:
{
...
"build": {
"configurations": {
"production": {
...
"extractLicenses": false
...
}
}
}
...
}
Same problem occurs with a node project and a --prod build
"builder": "@nrwl/node:build",
> NX Report complete - copy this into the issue template
@nrwl/angular : 8.8.0
@nrwl/cli : 8.8.0
@nrwl/cypress : 8.8.0
@nrwl/eslint-plugin-nx : 8.8.0
@nrwl/express : 8.8.0
@nrwl/jest : 8.8.0
@nrwl/linter : 8.8.0
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : 8.8.0
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 8.8.0
@nrwl/web : Not Found
@nrwl/workspace : 8.8.0
typescript : 3.6.4
❯ ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 9.0.0-rc.2
Node: 12.9.1
OS: linux x64
Angular: 9.0.0-rc.2
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.14
@angular-devkit/build-angular 0.900.0-rc.2
@angular-devkit/build-optimizer 0.900.0-rc.2
@angular-devkit/build-webpack 0.803.14
@angular-devkit/core 8.3.14
@angular-devkit/schematics 8.3.14
@angular/cdk 8.2.3
@angular/material 8.2.3
@ngtools/webpack 9.0.0-rc.2
@schematics/angular 8.3.14
@schematics/update 0.900.0-rc.2
rxjs 6.5.3
typescript 3.6.4
webpack 4.39.2
Thank you for your report :) We will fix the schematic soon
@brandonroberts @jaysoo I just run create-nx-workspace with angular-nest preset and the issue is still present in the created project... Please reopen this issue
I'm still seeing the error after re-installing the lib a couple of times.
The package.json was updated in the PR that closes this issue, but I noticed the following locally after installing 8.8.2:
[brad@brad-pc my-project]$ npm ls license-webpack-plugin
[email protected] /home/brad/Projects/my-project
├─┬ @angular-devkit/[email protected]
│ └── [email protected]
└─┬ @nrwl/[email protected]
└── [email protected]
The lib with @nrwl/node 8.8.2 is still pointing to the old license one. I have no idea how to fix that, but that can't be right :smile:
The fix has landed in master and will go out with the next release
Most helpful comment
Here is a workaround, only if you don't care about extracting license files.
In your
angular.jsonfile, setextractLicensestofalsein theproductionconfiguration section: