Error – Cannot find module ‘@angular-devkit/core’ while running ng serve
When you create Angular Project with Angular CLI and want to run your angular application using “ng serve” command you might see the following error “Error – Cannot find module ‘@angular-devkit/core'”
Solution
To resolve “cannot find module ‘@angular-devkit/core'” error try the following steps
Run the following npm update command
npm update -g @angular/cli
Then check whether Angular CLI version of your local (package.json of your project folder) matching with the global version. If not open the package.json file and edit the version like following
----- "devDependencies": { "@angular/cli": "1.7.4", "@angular/compiler-cli": "^5.0.0", "@angular/language-service": "^5.0.0", ------
Note: My global version is “1.7.4”, so I had updated local version as “1.7.4” to match the same. Then run the following command
npm install
Then now try running your angular app using “ng serve“. Hope this solves your issue 🙂
Further Learning
- Angular JS Project Setup and Hello World Application
- Golang Project Setup For Beginners
- Hello World Golang and Go tool