question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng serve stop watching changes after an error in typescript file

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.4.6 node: 6.10.3 os: win32 x64 @angular/animations: 4.4.4 @angular/common: 4.4.4 @angular/compiler: 4.4.4 @angular/core: 4.4.4 @angular/forms: 4.4.4 @angular/http: 4.4.4 @angular/platform-browser: 4.4.4 @angular/platform-browser-dynamic: 4.4.4 @angular/router: 4.4.4 @angular/cli: 1.4.6 @angular/compiler-cli: 4.4.4 @angular/language-service: 4.4.4 typescript: 2.3.4

Repro steps.

Make an error in ts file. You get a message: webpack: Failed to compile. Get rid of the error in the code. ng serve does not rebuild automatically.

The log given by the failure.

ERROR in events.service.ts (13,21): Cannot find name ‘Routerws’. webpack: Failed to compile.

Desired functionality.

The ng serve should detect the fixes after an error and rebuild the app like always. For now, everytime, I have an error I need to kill the process with ctr+c and retype ng serve again.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:16
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
filipesilvacommented, Oct 12, 2017

@hiepxanh it is intended that builds fail while you have errors, but this report seems to show it will not rebuild even after the error is fixed.

5reactions
filipesilvacommented, Oct 12, 2017

This is unintended and I will investigate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular - ng serve not detecting file changes automatically
Most of the times in Linux, ng serve or ng build --watch doesn't work if the directory doesn't have sufficient permissions.
Read more >
ng test
Option Description Value Type Defau... ‑‑browsers Override which browsers tests are run against. string ‑‑code‑coverage Output a code coverage report. boolean false ‑‑code‑coverage‑exclude Globs to exclude...
Read more >
Watch and WatchOptions
Turn on watch mode. This means that after the initial build, webpack will continue to watch for changes in any of the resolved...
Read more >
Identify and Fix Build and Deployment Errors in Your ...
Usually, this can easily be fixed by stopping the ng serve ... very common Angular error is linked directly to the TypeScript type...
Read more >
ng serve changes not detected when use "safe write ...
3.add changes in a typescript file. What is the expected result? changes are displayed instantly in the browser after the ng serve rebuilds...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found