Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find module '@angular-devkit/core'

I have created a angular project with Angular CLI: 1.6.3 Node: 9.4.0 OS: linux x64 version. But when want to run my angular app with command ng serve then fetch this error

Cannot find module '@angular-devkit/core'.

like image 738
azmul hossain Avatar asked Jan 23 '18 04:01

azmul hossain


People also ask

How fix Cannot find module '@ Angular Devkit build Angular package json?

To solve the error "Could not find module '@angular-devkit/build-angular'", make sure to install the package by opening your terminal in your project's root directory and running the following command: npm i -D @angular-devkit/build-angular and restart your IDE and development server.

Can not find module in Angular?

To solve the error "Cannot find module '@angular/core'", make sure you have installed all dependencies by running the npm install command, set the baseUrl option to src in your tsconfig. json file and restart your IDE and development server.

What is Devkit in Angular?

DevKit was built to provide libraries that can be used to manage, develop, deploy, and analyze your code. DevKit has a schematics-cli command line tool that you can use to create your own Schematics.


2 Answers

Try the following steps,

Step 1:

npm update -g @angular/cli

Step 2:

Edit your package.json changing the line

"@angular/cli": "1.6.0",

to

"@angular/cli": "^1.6.0",

STEP 3:

npm update

Refer the steps

like image 155
Sajeetharan Avatar answered Sep 25 '22 03:09

Sajeetharan


Step1: Edit your package.json changing the line

@angular/cli": "1.6.4" 

to

@angular/cli": "^1.6.4" 

Step2:

npm update -g @angular/cli  

Step3:

npm install --save-dev @angular/cli@latest 

I was facing the exact same problem. These three did the tasks for me. You may like to see https://github.com/angular/angular-cli/issues/9307

like image 21
krishna murari Avatar answered Sep 25 '22 03:09

krishna murari