Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng serve does not detect file changes #6695

Closed
Bsujeet opened this issue Jun 15, 2017 · 7 comments
Closed

ng serve does not detect file changes #6695

Bsujeet opened this issue Jun 15, 2017 · 7 comments
Assignees
Labels
needs: more info Reporter must clarify the issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity3: broken

Comments

@Bsujeet
Copy link

Bsujeet commented Jun 15, 2017

os

  • 7

Versions

-@angular/cli: 1.1.1
node: 7.10.0
os: win32 x64
@angular/animations: 4.2.2
@angular/common: 4.2.2
@angular/compiler: 4.2.2
@angular/core: 4.2.2
@angular/forms: 4.2.2
@angular/http: 4.2.2
@angular/platform-browser: 4.2.2
@angular/platform-browser-dynamic
@angular/router: 4.2.2
@angular/cli: 1.1.1
@angular/compiler-cli: 4.2.2
@angular/language-service: 4.2.2

###Steps

-created new project with ng new
-compiled with ng serve -o --watch

I have read and tested all the steps in issue #4338
but i am not able to solve the issue.

As i am new to angular i don't know what is the issue.

So had to stop and reastart ng serve manually

@Brocco
Copy link
Contributor

Brocco commented Jun 15, 2017

Please provide some more details

What file did you change?
What change did you make?
What were you expecting to see?
What did you see in the browser?
What did you see in the brower's console?

@Brocco Brocco self-assigned this Jun 15, 2017
@Brocco Brocco added needs: more info Reporter must clarify the issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity3: broken labels Jun 15, 2017
@rexebin
Copy link

rexebin commented Jun 18, 2017

For Webstorm users, make sure "Use safe write" in the settings is disabled, for myself was bugged by this.

@Christian-Yang
Copy link

Christian-Yang commented Jun 19, 2017

I have the same problem !

my development environment:

node :v6.9.0

@angular/cli: 1.1.1
node: 6.9.0
os: linux x64
@angular/animations: 4.1.3
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.1.1
@angular/compiler-cli: 4.1.3
@angular/language-service: 4.1.3

OS-1:Linux localhost.localdomain 4.8.6-201.fc21.x86_64 #1 SMP Wed Nov 

             9 20:21:15 CST 2016 x86_64 x86_64 x86_64 GNU/Linux

OS-2: Linux  3.13.0-74-generic #118~precise1-Ubuntu SMP Fri Dec 

            18 10:38:55 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

tool: sublime

I wrote a code, this code have a problem, this will be an error, the page can not be loaded, the console can see the following information.
abcd

abqa

Then I deleted the problem code, please note that it is not modified, but completely remove this code.

Then I can see the angular cli built-in webpack to re-compile the changed file. But please note that I found that although the compiler but the error still. As if the file had not been modified. But I re-run ng-serve this time will find the error disappears, the page and the console are normal.

So I had to re-run ng-serve

Just now, I found a problem.There is a simple demo on my computer.

How to solve this problem, look forward to everyone's help. Many thanks

I found the reason for my problem, I wrote a service, but I did not import and use the service anywhere. This will appear [angular-cli] did not detect my service file changes. As long as I imported the service in other components, the use of this service, then this time, my service file when the error occurs, it will immediately [angular-cli] compiler, and found.

@rsaenen
Copy link

rsaenen commented Jul 2, 2017

Versions.

@angular/cli: 1.2.0
node: 8.1.2
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/platform-server: 4.2.5
@angular/router: 4.2.5
@angular/cli: 1.2.0
@angular/compiler-cli: 4.2.5
@angular/language-service: 4.2.5

Repro steps.

Live reload is not working since I upgrade ng/cli to 1.2.0.
I try vscode and sublime as editor.

@IRiViI
Copy link

IRiViI commented Jul 5, 2017

Same issue
Ubuntu 16.04

Versions:
"@angular/animations": "^4.0.0",
"@angular/common": "^4.0.0",
"@angular/compiler": "^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/router": "^4.0.0",
dev
"@angular/cli": "1.2.0",
"@angular/compiler-cli": "^4.0.0",
"@angular/language-service": "^4.0.0",

I had the same problem in the previous version
"@angular/cli": "1.0.1",
"@angular/compiler-cli": "^4.0.0",

Angular cli started to have the problem that it could not refresh projects upon saving files. So I reinstalled my entire computer. At first Angular cli was working properly again. But after cloning my projects and testing those, I started to have the same problem again....

@Bsujeet Bsujeet closed this as completed Jul 19, 2017
@fsenart
Copy link

fsenart commented Nov 18, 2017

I had the same problem and stumbled upon #2356. Changing inotify watchers limit as suggested in #2356 (comment) was the solution 😄

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: more info Reporter must clarify the issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity3: broken
Projects
None yet
Development

No branches or pull requests

7 participants