7

I am developing an Angular project and everything worked fine until today. I did no changes. But now, don´t know why. the "npm start" command stopped working fine. The project gets succesfully compiled but once I make some change, the compilation doesn´t reload automatically and any change on my code isn´t shown.

I tried to add the --watch flag on the package.json file like suggested on some sites, but doesn't work.

This is the relevant code on my .json file


 "scripts": {
    "ng": "ng",
    "start": "ng serve --open --host 0.0.0.0 --baseHref=/",

}

I can't use ng serve because it would fire an error due to the missing baseHref. It is a requirement to make it work this way, with this command, so has been told to me.

Environment I am working with:


Angular CLI: 7.3.6
Node: 10.15.1
OS: win32 x64
Angular: 7.2.11
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.6
@angular-devkit/build-angular     0.13.6
@angular-devkit/build-optimizer   0.13.6
@angular-devkit/build-webpack     0.13.6
@angular-devkit/core              7.3.6
@angular-devkit/schematics        7.3.6
@angular/cli                      7.3.6
@ngtools/webpack                  7.3.6
@schematics/angular               7.3.6
@schematics/update                0.13.6
rxjs                              6.3.3
typescript                        3.2.4
webpack                           4.29.0


Thanks a lot.

Fran
  • 111
  • 1
  • 3

3 Answers3

1

try sudo npm run start I had similar issue and only for in our team it happened but sudo solved issue.

0

I had a similar error, in Linux. It turned out to be a problem of open files limit:

React Native Error: ENOSPC: System limit for number of file watchers reached

luca.vercelli
  • 898
  • 7
  • 24
-1

Delete the node_modules folder. Run npm install And then, re-run your command npm start

Niraj
  • 775
  • 7
  • 20