Try to run
npm install
in the project folder
While running ng serve
you should be in the app's/project's directory.
If you run the command in another directory you get the error:
You seem to not be depending on "@angular/core". This is an error.
Delete your node modules , Check your package.json
file should have the @angular/core
and reinstall it with npm i
.
Then run following command it will update npm packages.
npm update
Later start project executing following command.
ng serve
Above steps worked for me.
May help you.
This will solve you problem.
from terminal
> cd myProjectPath
myProjectPath > npm install
Below steps worked for me:
1) Delete the node_modules/
folder and package-lock.json
file.
2) npm install
3) ng serve
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With