Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

You seem to not be depending on "@angular/core". This is an error

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.


  1. Delete node_modules folder and package-lock.json file.
  2. Then run following command it will update npm packages.

    npm update

  3. Later start project executing following command.

    ng serve

Above steps worked for me.


May help you.

  • Delete All folders you have created previously
  • Create fresh folder
  • Then try navigate to that folder from command "cd foldername"
  • then try to install "npm install"

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