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:
git clone https://github.com/mrholek/CoreUI-Angular.git
cd CoreUI-Angular/Angular5_CLI_Starter
npm install
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)
@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:
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
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@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. ThanksAlso get the same error … Thank You everyone for Help (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 versionng-v
6. Serveng s
cannot reproduce
@angular-devkit
is required by@angular/cli
as dependency maybe something went wrong withnpm install
node
andnpm
?node_modules
directory andpackage-lock.json
file, retrynpm install
npm cache clean
please let us know if this helps
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 folderI just did the following:
@deilan I believe you should close this issue…
It worked fine for me thanks @immad-hamid