Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"npm start" doesn´t recompile automatically and doesn´t show code changes

Tags:

npm

angular

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.

like image 500
Fran Avatar asked Aug 19 '26 03:08

Fran


1 Answers

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

like image 116
user11291156 Avatar answered Aug 20 '26 18:08

user11291156



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!