LoginSignup
0
0

More than 5 years have passed since last update.

Error: Cannot find module '@angular-devkit/core'

Last updated at Posted at 2018-05-19

I struggled with the same problem just a minute ago. My project was generated using the v 1.6.0 of angular-cli.

when I am going to start my ng server, then encounter the below error.

ng s

error⬇︎

module.js:557
    throw err;
    ^
Error: Cannot find module '@angular-devkit/core'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/workspace/observable-app/node_modules/@angular-devkit/schematics/src/tree/virtual.js:10:16)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)

do not worry, here is a solution.
first, you need to change the @angular/cli version.
editing my package.json changing the line

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

then now

npm update

and it works.:thumbsup::clap:

I hope it will help you too.

Enjoy Coding...:grinning::grinning:

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0