Reputation: 931
I have created a project from Angular CLI and started using "ng serve" command to run the app. It shows "web pack: compiled successfully" but not working in web browser.
Console errors found like 'Failed to load resource: the server responded with a status of 404 (Not Found)' for all the files like "main.bundle.js, polyfills.bundle.js and styles... etc.
I understand due to missing the files on load throwing error. I do not understand why is giving error even though compiled successfully.
Working on Node v10.13.0
Any expert inputs please?
Upvotes: 0
Views: 1888
Reputation: 1127
It looks to be an issue with caching. Run:
npm cache clean or npm cache verify.
That has solved it for me.
Upvotes: 0
Reputation: 1271
Uninstall the node_modules or comment the node_modules folder and do
npm install
Looks like your node_modules are not compatible with your Angular 5 version.
Then run ,
ng serve -o
-o to open the application in browser automatically
Upvotes: 1