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'.
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.
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.
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.
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
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
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