ng serve produces error randomly
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.0.0
node: 6.10.1
os: linux x64
@angular/animations: 4.0.0
@angular/cli: 1.0.0
@angular/common: 4.0.0
@angular/compiler: 4.0.0
@angular/compiler-cli: 4.0.0
@angular/core: 4.0.0
@angular/forms: 4.0.0
@angular/http: 4.0.0
@angular/platform-browser: 4.0.0
@angular/platform-browser-dynamic: 4.0.0
@angular/platform-server: 4.0.0
@angular/router: 4.0.0
@ngtools/webpack: 1.3.0
Repro steps.
ng serve
The log given by the failure.
Module build failed: Error
at WebpackCompilerHost.populateWebpackResolver (/home/bunyamin/WebstormProjects/c3dp/node_modules/@ngtools/webpack/src/compiler_host.js:135:51)
at _donePromise.Promise.resolve.then.then.then.then.then (/home/bunyamin/WebstormProjects/c3dp/node_modules/@ngtools/webpack/src/plugin.js:366:32)
at process._tickCallback (internal/process/next_tick.js:109:7)
@ ./src/app/patient/patient-care-plan/index.ts 2:0-105
@ ./src/app/patient/patient.module.ts
@ ./src async
@ ./~/@angular/core/@angular/core.es5.js
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
Desired functionality.
The project does not contain any error and works well. However, it gives the error above when it recompiled at some random moments.
Mention any other details that might be useful.
The most obvious example of this bug: I was working on my project (there were no errors) and I added just a comment like // some comment and it gave the error when recompiled. Then, I stopped and re-run the ng serve command and there were no error this time.
bump .. just wanted to add this is a frustrating bug. Sometimes I can't get it to recompile at all, so then I have to terminate Karma, which closes the browser, so I loose my breakpoints. This is very annoying while trying to debug an issue.
This doesn't happen for me in just karma. Mainly if I change anything in a lazy-loaded module, I have to add/remove whitespace so that I can re-save and sometimes takes up to 10 times to build properly.
Same issue here. I'm on OSX and it seems to be related to lazy loading modules.
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.