0

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?

1

2 Answers 2

5

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))

Sign up to request clarification or add additional context in comments.

Comments

3

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 :) .

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.