0

I've updated the angular using the following commands: npm update -g, npm upgrade -gand now I got that error on using ng serve.

The "@angular/compiler-cli" package was not properly installed.
Error: The "@angular/compiler-cli" package was not properly installed.
    at Object.<anonymous> (/Users/lechucico/Documents/LegacyLife/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/index.js:14:11)
    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)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/lechucico/Documents/LegacyLife/node_modules/@angular/cli/tasks/eject.js:10:19)
    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)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
2
  • Are you sure you are in the right folder? I'm getting it when running it in a folder with an empty node_modules folder... Commented Jul 31, 2017 at 23:26
  • I'm on my project folder, so yes. Commented Aug 1, 2017 at 7:49

2 Answers 2

1

use with -f or --force flag it will work.

or go with this github issue

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

Comments

0

The first line says it all it's not properly install

Step 1.

npm uninstall -g angular-cli

Step 2. npm cache clean

Step 3. npm install -g angular-cli@latest

Then you can create new project with ng new myapp

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.