Reputation: 1175
I have the global version 1.5.0 of angular / cli, I have downloaded the visual studio code and I have created a project with the command "ng new projectCheckBox", then I have done an ng serve and visual studio code throws me the following error
E: \ Projects \ AngularCode \ projectCheckBox> ng serve
module.js: 487
throw err;
^
Error: Cannot find module '@ angular-devkit / core'
at Function.Module._resolveFilename (module.js: 485: 15)
at Function.Module._load (module.js: 437: 25)
at Module.require (module.js: 513: 17)
at require (internal / module.js: 11:18)
at Object. <anonymous> (E: \ Projects \ AngularCode \ projectCheckBox \ node_modules \ @ angular-devkit \ schematics \ src \ tree \ virtual.js: 10:16)
at Module._compile (module.js: 569: 30)
at Object.Module._extensions..js (module.js: 580: 10)
at Module.load (module.js: 503: 32)
at tryModuleLoad (module.js: 466: 12)
at Function.Module._load (module.js: 458: 3)
I'm missing something?
Upvotes: 0
Views: 783
Reputation: 86
Are you using Node Package Manager? If so, you might wanna run:
npm install
(to install all missing packages) or
npm update -g @angular/cli
(to update your cli (globally))
Upvotes: 5
Reputation: 68
Lea is right! Can use this :
npm update -g @angular/cli
and edit your package.json changing the line "@angular/cli": "1.5.0", to "@angular/cli": "^1.5.0",
after use :
npm update
But command : npm update -g @angular/cli
should be enough :) .
Upvotes: 3