Reputation: 75
I looked for other questions available on stack but was not able to find ans related to this issue.
I have just started Angular and installed things as asked on Udemy course. Creating app and then starting with ng serve.
While I am running ng serve, I am getting below error.
After running npm install I am getting below message.
Can you please guide me to solve this error ?
Thank you very much in advance. :)
Upvotes: 1
Views: 896
Reputation: 75
Thank you for above answers. With below steps followed including avoiding few mistakes, I was able to make it work.
Installed packages in C drive instead of my application folder. Deleted my old app and recreated it from scratch.
And then when I gave "ng serve" it ran fine.
Upvotes: 0
Reputation: 21
If the error message persists after installing packages, it may be due to the NPM settings. In recent versions of the package manager, by default it only installs the packages needed for the production version of the project. The "build-angular" package is a development dependency. If you want to make the website work, you have to tell NPM to install the development packages, by adding the "--only" option with the "dev" version so you should use this command instead:npm i --only=dev
Upvotes: 1
Reputation: 21
well try this one it works for me: npm install --save-dev @angular-devkit/build-angular
Upvotes: 1