angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

rebuild with ng serve is not reliable

Open manuel-mauky opened this issue 9 years ago • 30 comments

I'm using ng serve to get instant feedback while I'm developing but in some (unknown) situations the rebuilding isn't reliable. Sometimes I'm getting compile errors that I've already fixed. If I restart ng serve then the errors don't show up anymore. This worsens developer productivity a lot because I spend time to find an error in my code that doesn't exist anymore until I remember to restart the build command.

OS?

Windows 8

Versions.

$ ng --version
@angular/cli: 1.0.0-rc.1
node: 7.1.0
os: win32 x64

Repro steps.

App was created using the CLI. I'm not able to reliable reproduce the problem. It sometimes happens and sometimes not. However, these are the steps I'm doing:

  1. ng serve
  2. write some code and rebuilding works fine
  3. write an error in the code that produces a compile error
  4. fix the code
  5. The code is rebuild as expected but the compile error still shows up.
  6. kill ng serve and restart it
  7. The code compiles just fine.

The log given by the failure.

No specific error message.

Mention any other details that might be useful.

I've used version 1.0.0-beta.24 for a long time without such problems. Only after I updated to 1.0.0-rc.1 the problem started to occur.

manuel-mauky avatar Mar 13 '17 15:03 manuel-mauky

I don't know if this is related, but it sounds quite like it. When installing angular-cli, I get the following warning:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

fsevents very much sounds like it's required to detect file changes and reinitiate the building process.

Or... how is that done on Windows?

HWiese1980 avatar Oct 05 '17 17:10 HWiese1980

In the meantime I've updated to @angular/cli-1.5.0-beta.4. Bug/strange behavior persists.

HWiese1980 avatar Oct 10 '17 18:10 HWiese1980

I use cli 1.4.6, this error still exists, it is a pain in the ass, I have to cancel the serve task and start it again, each time, I got an error in the code.

Chris2011 avatar Oct 16 '17 11:10 Chris2011

It looks like this was fixed in 1.4.7 Just installed "@angular/cli": "1.4.7" and webpack is now compiling after a 'Failed to compile' error.

I'm on Windows 10.

  "@angular/animations": "^4.2.4",
  "@angular/common": "^4.2.4",
  "@angular/compiler": "^4.2.4",
  "@angular/core": "^4.2.4",
  "@angular/forms": "^4.2.4",
  "@angular/http": "^4.2.4",
  "@angular/platform-browser": "^4.2.4",
  "@angular/platform-browser-dynamic": "^4.2.4",
  "@angular/router": "^4.2.4",

  "@angular/cli": "1.4.7",
  "@angular/compiler-cli": "^4.2.4",
  "@angular/language-service": "^4.2.4",

mariusc09 avatar Oct 16 '17 13:10 mariusc09

Thx. Updated to 1.4.7 and it seems to be fixed :)

Chris2011 avatar Oct 16 '17 13:10 Chris2011

I still have this issue randomly with interfaces their signatures being updated. Using angular/cli ^1.4.8.

ghost avatar Oct 30 '17 16:10 ghost

The issue still persists. @angular/cli 1.6.0. :(

Maximaximum avatar Dec 10 '17 16:12 Maximaximum

I think this should be reopened

Maximaximum avatar Dec 10 '17 16:12 Maximaximum

The issue still persists. @angular/cli 1.7.4

jodavaga avatar May 07 '18 17:05 jodavaga

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.