angular-cli: Build is not kicking off in a browser on save
OS
Windows 10.
Versions.
angular-cli: 1.0.0-beta.28.3
node: 6.9.2
os: win32 x64
@angular/common: 2.4.5
@angular/compiler: 2.4.5
@angular/core: 2.4.5
@angular/flex-layout: 2.0.0-beta.4
@angular/forms: 2.4.5
@angular/http: 2.4.5
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.5
@angular/platform-browser-dynamic: 2.4.5
@angular/router: 3.4.5
@angular/compiler-cli: 2.4.5
Repro steps.
Migrate from beta.24 to beta.28.3 Modify any file Click save Chrome dev console saying:
[WDS] App updated. Recompiling...
[WDS] Nothing changed.
The new build is not kicking off
So had to stop and reastart ng serve
manually
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 41
- Comments: 81 (12 by maintainers)
Commits related to this issue
- fix(@ngtools/webpack): resolve file name before invalidating cached files (#4384) Fix WebpackCompilerHost's cache invalidation behavior on Windows systems. Previously, no call to _resolve was made, ... — committed to angular/angular-cli by msmorgan 7 years ago
- fix(@ngtools/webpack): resolve file name before invalidating cached files (#4384) Fix WebpackCompilerHost's cache invalidation behavior on Windows systems. Previously, no call to _resolve was made, ... — committed to MRHarrison/angular-cli by msmorgan 7 years ago
- fix(@ngtools/webpack): resolve file name before invalidating cached files (#4384) Fix WebpackCompilerHost's cache invalidation behavior on Windows systems. Previously, no call to _resolve was made, ... — committed to asnowwolf/angular-cli by msmorgan 7 years ago
npm install --save @ngtools/webpack@1.2.4
seems to have fixed it for me. thanks to @beeman for his solution in #4329.I had the same issue but got it working!
My setup: A virtual machine running Linux with shared folders to Windows, coding in PhpStorm. My solution: In PhpStorm disabling the option Use “safe write” under Appearance / System Settings
Ok, it doesn’t work with @ngtools/webpack@1.2.6
With @ngtools/webpack@1.2.4 it works fine.
@angular/cli
has the same problem. Changes are not detected. Especially difficult when a full rebuild takes more than 30 secondsBeta 28 is broken af…
@aprades cd to your project and run
npm install --save @ngtools/webpack@1.2.4
in that directorySame issue. Recompile is not working properly.
And you are showing that next release will be production release.
@web-dave Maybe it is damn fast because it does not compile any typescript 😉
Hello. I am having the same problem. Every change I make to ANY file causes me to end the command and do
ng serve
just to see the changes.package.json temporary fix for beta.30
“devDependencies”: { “@angular/cli”: “1.0.0-beta.30”, … “@ngtools/webpack” : “1.2.4” }
Looks like something is broken after 1.2.4
@MarkWilsoncom npm uninstall angular-cli --save npm install @angular/cli@lastest --save npm install @ngtools/webpack@1.2.4 --save
This worked for me.
Same issue here on Win 10
It need to be
"@ngtools/webpack": "1.2.4"
at package.json and NOT"@ngtools/webpack": "^1.2.4"
@kuncevic same issue here, npm clean, reinstalled beta.30 and tested on a new blank project. Major issue, I’m going to revert to beta.28.3 Too bad because performance improved a lot in the last cycle.
Just tested with beta.30 which is coming with
@ngtools/webpack@1.2.7
is still having the the same issue.npm install @ngtools/webpack@1.2.4
do not helps with beta.30 I am back to beta.28.3 +npm install @ngtools/webpack@1.2.4
again.This issue seems to affect new .ts files or changes in any .ts files as well. Template changes in .html files update, but underlying script files do not.
I faced with the same problem on Ubuntu 16.04 and angular CLI 1.0.0-beta.30
The problem was related with Inotify Watches Limit on Linux. To solve to issue I increased the watches limit to 512K
After that I restarted my IDE (WebStorm in my case) and after that the change detection started to work.
Thanks, @legit . Installing @ngtools/webpack@1.2.4 resolved my issue.
Yep. There was an issue previously with webpack 1.2.5 which was fixed in 1.2.6 a couple of hours ago. A new angular-cli wasn’t released, just a new version of @ngtools/webpack, so make sure you’ve got that guys
Yes but with @ngtools/webpack@1.2.4 the lazyloaded bundles are not generated if you use
import * as
somewhere in your code (even in node_modules).For me, right now it only works with “@angular/cli@1.0.0-beta.30” and @ngtools/webpack@1.2.4
@chapultepec Please do not repeatedly cross-post the same message.
Also, advocating running a command as root as a general solution opens up the user to potential security implications.
sudo
should only be used when root permissions are absolutely required.sudo ng serve
works for me!Thanks @legit for solving my issue
When will there be a release? Im waiting for this every day 😃
I can see an about 2s improvement. I get a 2-3 seconds build time on save. Previously i was getting 4-5 seconds before.
"@ngtools/webpack": "1.2.4"
worked here@web-dave: tried your fix and now get the following on calling ng serve:
Cannot find module ‘rxjs/symbol/observable’ Error: Cannot find module ‘rxjs/symbol/observable’ at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at globalScope (C:\Users\Media\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular\core\bundles\core.umd.js:7:85) at Object.<anonymous> (C:\Users\Media\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular\core\bundles\core.umd.js:10:2) at Module._compile (module.js:570:32) at Object.Module._extensions…js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) … Output from ng v:
@angular/cli: 1.0.0-beta.30 node: 6.9.4 os: win32 x64 @angular/common: 2.4.6 @angular/compiler: 2.4.6 @angular/core: 2.4.6 @angular/forms: 2.4.6 @angular/http: 2.4.6 @angular/platform-browser: 2.4.6 @angular/platform-browser-dynamic: 2.4.6 @angular/router: 3.4.6 @angular/compiler-cli: 2.4.6 @ngtools/webpack: 1.2.4
I’ve got in to another trouble https://github.com/angular/angular-cli/issues/4380 after migrating my current project from
beta.28.3
tobeta.29
So I just rolled back tobeta.28.3
for now +npm install @ngtools/webpack@1.2.4
on top of it@niklas-dahl I believe it installs beta 28.3 instead of 29 if you use angular-cli.
That explains why it works for me. The version I get on a new project is
@ngtools/webpack@1.2.6
.