-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
OS
Windows 7 x64
Versions
angular-cli: 1.0.0-beta.18
node: 5.10.1
os: win32 x64
and after upgrading
angular-cli: 1.0.0-beta.18
node: 6.9.1
os: win32 x64
Repro steps.
I set up a repo with a testcase and description here.
In short: On Windows7 webpack aot compilation hangs indefinitly on "95% emitting". I did some debugging and finally wound up in webpack/lib/Compiler.js Compiler.prototype.emitAssets line 288.. . It seems that the path for the source-map file is generated incorrectly by concatenating 2 absolute paths in line 310: this.outputFileSystem.join(outputPath, dir) . This leads to an endless loop of failed directory creations and hangs the compilation process.
Removing devtool from the webpack configuration solves the problem (albeit loosing the source-map). Further testing shows that replacing styleUrls with styles in app.component.ts also solves the problem (albeit loosing the external css file).
The log given by the failure.
66% building modules 468/474 modules 6 active ...node_modules\rxjs\util\errorOb
66% building modules 468/475 modules 7 active ...ules\rxjs\util\UnsubscriptionE
66% building modules 469/475 modules 6 active ...ules\rxjs\util\UnsubscriptionE
66% building modules 470/475 modules 5 active ...ules\rxjs\util\UnsubscriptionE
66% building modules 471/475 modules 4 active ...ules\rxjs\util\UnsubscriptionE
66% building modules 472/475 modules 3 active ...ules\rxjs\util\UnsubscriptionE
66% building modules 473/475 modules 2 active ...ules\rxjs\util\UnsubscriptionE
66% building modules 474/475 modules 1 active ...ules\rxjs\util\UnsubscriptionE
95% emitting
Mention any other details that might be useful.
The bug was reproducable on another Windows7 development system.
Update, 2016-12-16
I upgraded to @ngtools/webpack 1.1.9 and the bug is still there. But I found a workaround by switching from css to less: In webpack.config.js:
{ test: /\.less$/, loaders: ['to-string-loader', 'css-loader', 'less-loader']},
And in app.component.ts:
styleUrls: ['./app.component.less']
Works for me so far.
Update, 2017-01-04
I updated to node 6.9.3 and npm 4.1.1. Additionally I upgraded @angular, @ngtools and various dependecies (see package.json in test repo).
Result: Still hangs at 95€ emitting.
Update, 2017-02-16
I updated @ngtools/angular to version 1.2.9. Now it works. Bug closed.