Closed
Description
🐞 Bug report
Command (mark with an x
)
- [ ] new
- [x ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Is this a regression?
The previous version in which this bug was not present was: 7
Description
When I build Angular 8 app with PWA in production mode, while "ngswConfigPath" in angular.json is not set correctly, build result depends on build command:
ng build --prod
does not show any error, build looks like successfulnpm run ng build -- --prod
ends with ELIFECYCLE error without any detailed informations
🔬 Minimal Reproduction
ng new BugReportApp
ng add @angular/pwa
- go into
angular.json
file and brokengswConfigPath
setting - IE set its value to"xxx"
- at this point, running
ng build --prod
does not show any build error!? - running
npm run ng build -- --prod
shows only default error message without any useful informations
In Angular 7 same steps shown more useful error info in both cases.
🔥 Exception or Error
Only error shown while running build using npm is this one:
Date: 2019-06-18T09:12:08.024Z
Hash: cdebbff85960828461ab
Time: 9604ms
chunk {0} runtime-es2015.858f8dd898b75fe86926.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main-es2015.76c91721d1c30892da74.js (main) 147 kB [initial] [rendered]
chunk {2} polyfills-es2015.27661dfa98f6332c27dc.js (polyfills) 36.4 kB [initial] [rendered]
chunk {3} styles.09e2c710755c8867a460.css (styles) 0 bytes [initial] [rendered]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] ng: `ng "build" "--prod"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] ng script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\stanley\AppData\Roaming\npm-cache\_logs\2019-06-18T09_12_08_167Z-debug.log
debug log content:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'ng',
1 verbose cli 'build',
1 verbose cli '--',
1 verbose cli '--prod' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preng', 'ng', 'postng' ]
5 info lifecycle [email protected]~preng: [email protected]
6 info lifecycle [email protected]~ng: [email protected]
7 verbose lifecycle [email protected]~ng: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~ng: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\workspace\playground\BugReport\node_modules\.bin;C:\Python37\Scripts\;C:\Python37\;C:\Program Files\Microsoft MPI\Bin\;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Business Objects\Common\3.5\bin\NOTES\;C:\Program Files (x86)\Business Objects\Common\3.5\bin\NOTES\DATA\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Go\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\nodejs\;C:\Users\stanley\AppData\Local\Microsoft\WindowsApps;C:\Users\stanley\.dotnet\tools;C:\Program Files\JetBrains\WebStorm 2019.1.3\bin;C:\tools\Cmder;C:\Users\stanley\go\bin;C:\Users\stanley\AppData\Roaming\npm
9 verbose lifecycle [email protected]~ng: CWD: D:\workspace\playground\BugReport
10 silly lifecycle [email protected]~ng: Args: [ '/d /s /c', 'ng "build" "--prod"' ]
11 silly lifecycle [email protected]~ng: Returned: code: 1 signal: null
12 info lifecycle [email protected]~ng: Failed to exec ng script
13 verbose stack Error: [email protected] ng: `ng "build" "--prod"`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd D:\workspace\playground\BugReport
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "ng" "build" "--" "--prod"
18 verbose node v10.16.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] ng: `ng "build" "--prod"`
22 error Exit status 1
23 error Failed at the [email protected] ng script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
🌍 Your Environment
Angular CLI: 8.0.3
Node: 10.16.0
OS: win32 x64
Angular: 8.0.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.800.3
@angular-devkit/build-angular 0.800.3
@angular-devkit/build-optimizer 0.800.3
@angular-devkit/build-webpack 0.800.3
@angular-devkit/core 8.0.3
@angular-devkit/schematics 8.0.3
@angular/cli 8.0.3
@angular/pwa 0.800.3
@ngtools/webpack 8.0.3
@schematics/angular 8.0.3
@schematics/update 0.800.3
rxjs 6.4.0
typescript 3.4.5
webpack 4.30.0
Anything else relevant?