coreui-free-angular-admin-template: [Angular 5] Error: Cannot find module '@angular-devkit/core'

Node.js: 8.9.4 x64 npm: 5.6.0

Repro steps:

  1. git clone https://github.com/mrholek/CoreUI-Angular.git
  2. cd CoreUI-Angular/Angular5_CLI_Starter
  3. npm install
  4. npm start

Result:

module.js:540
    throw err;
    ^

Error: Cannot find module '@angular-devkit/core'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Dev\CoreUI-Angular\Angular5_CLI_Starter\node_modules\@angular-devkit\schematics\src\tree\virtual.js:10:16)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

@tanwarsatya @Deilan

I faced the same issue Today. This is how I fixed it:

1: Updated Angular Cli Globally by running: npm update -g @angular/cli

2: Remove node_modules folder from the project and then check the Angular Cli version by hitting ng -v like this: image

3: Check your project’s package.json file, if the version you checked earlier are same then goto your cmd and run npm install if not then change the @angular/cli version to the version you checked and then run npm install image

IT SHOULD START WORKING NOW…

Note: The above solution is valid and if it doesn’t work then you can follow my steps or you can directly use steps mentioned by me. Its a permanent fix.

Node.js: 8.9.4 x64 npm: 5.6.0

I can reproduce it only in the PRO version

Just have to change @angular/cli version from 1.6.4 to 1.6.5 to fix it

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

@parthmakadiya12 You need to update your cli globally what you have done changed your package in your project --save-dev update’s your project package. Now the problem is that globally you are running old package and in your project you are running updated packages.

Just run npm update -g and things would get fine. Thanks

Also get the same error … Thank You everyone for Help sss (npm update -g doesn’t worked so I tried these) 1.Just Updated the cli version globally. (1.6.7) npm install --save-dev @angular/cli@latest -g 2.Delete Node_Module 3.npm install 4.change package.json ->cli version to 1.6.7 5.check version ng-v 6. Serve ng s

cannot reproduce @angular-devkit is required by @angular/cli as dependency maybe something went wrong with npm install

  • what’s your version of node and npm?
  • remove node_modules directory and package-lock.json file, retry npm install
  • sometimes npm’s cache gets confused, reset it with npm cache clean

please let us know if this helps

hi @sashikiran52 please try npm i -D @angular-devkit/core in the project folder Hi @xidedix, Thank you, but It don’t work.

I found the solution, I uninstalled the Blue coat web agent in my laptop then I did angular installation got successful.

hi @sashikiran52 please try npm i -D @angular-devkit/core in the project folder

I just did the following:

  1. Replaced “@angular/cli”: “1.5.4” to “@angular/cli”: “^1.5.4” in “devDependencies” and then run the command: npm update and it gets fixed for me.

@deilan I believe you should close this issue…

It worked fine for me thanks @immad-hamid