FussinHussin
FussinHussin

Reputation: 1814

Angular ng serve error the "@angular/compiler-cli" package was not properly installed

I know this is a frequently asked question, but i can't resolve my issue. I have node and npm installed using nvm, all up to date, I clone my repository to desktop from https://github.com/CHBaker/First-Angular-App then i install the ng cli and do ng serve getting this error.

I have already followed steps in many threads about this issue including this thread Angular2 CLI error "@angular/compiler-cli" package was not properly installed

terminal error: Charless-MacBook-Pro:First-Angular-App charlesbaker$ 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/charlesbaker/.nvm/versions/node/v8.1.2/lib/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/charlesbaker/.nvm/versions/node/v8.1.2/lib/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) Charless-MacBook-Pro:First-Angular-App charlesbaker$

Upvotes: 2

Views: 2816

Answers (3)

HexaCrop
HexaCrop

Reputation: 4293

For me when I got the same problem, I just went inside my project folder and did the ng-serve command once again. That solved the issue in my case.

Upvotes: 1

FussinHussin
FussinHussin

Reputation: 1814

fixed by changing src/tsconfig.json to tsconfig.app.json, I compared this with a test project by running ng new TESTAPP and comparing the file names. tsconfig.app.json is the updated name for the latest version as of (6/25/17)

Upvotes: 0

Ploppy
Ploppy

Reputation: 15363

To reinstall the compiler-cli follow these steps:

Open your terminal at the root of your project and execute the following commands:

  • npm uninstall @angular/compiler-cli
  • npm install --save-dev @angular/compiler-cli

Upvotes: 1

Related Questions