ng build --watch doesn't work
See original GitHub issueBug Report or Feature Request (mark with an x)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.3.0-beta.0 node: 6.10.3 os: linux x64 @angular/animations: 4.2.5 @angular/common: 4.2.5 @angular/compiler: 4.2.5 @angular/core: 4.2.5 @angular/forms: 4.2.5 @angular/http: 4.2.5 @angular/platform-browser: 4.2.5 @angular/platform-browser-dynamic: 4.2.5 @angular/router: 4.2.5 @angular/cli: 1.3.0-beta.0 @angular/compiler-cli: 4.2.5 @angular/language-service: 4.2.5
Repro steps.
- Create your project on a shared folder (guest = centos 7, host= windows 7, provider = virtualbox)
- run: ng build --watch -> first compilation is fine
- modify a file in the project to force recompilation -> nothing happens
The log given by the failure.
No logs, nothing happens
Desired functionality.
Should recompile
Mention any other details that might be useful.
To summarize, the --watch functionality doesn’t seem to work on shared folders, which is painfull. I confirm that it works perfectly when run on the host directly. If I remember well, I have already had this kind of problem with typescript (which also have the --watch functionality), so it’s may be the same root cause. For information, when I encountered this problem on a previous projects with typescript, I fixed it by using the gulp.watch function. So if I’m right and the problem is the same, you could maybe consider using the same mechanism than gulp to watch files modifications.
Hope you’ll find a solution.
Regards
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top Related StackOverflow Question
Because the documentation is so vague, I’m just going to comment the command that is working for me on CLI -v 1.7.4.
ng build --output-path=extension-src --watch --poll 1000- 1000ms or 1 secI’m using the --output-path to bundle my code into another folder to be read from, so if that’s not necessary for you then you can just remove that flag. I hope this helps anyone with the same problem.
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.