The "@angular/compiler-cli" package was not properly installed.
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
$ ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
@angular/cli: 1.0.0
node: 6.10.0
os: darwin x64
@angular/common: 4.0.1
@angular/compiler: 4.0.1
@angular/core: 4.0.1
@angular/forms: 4.0.1
@angular/http: 4.0.1
@angular/platform-browser: 4.0.1
@angular/platform-browser-dynamic: 4.0.1
@angular/router: 4.0.1
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.1
OS: MAC OS Yosemite
Repro steps.
$ ng new --link-cli true --style scss --routing true learn-ng
installing ng
create .editorconfig
[...]
Successfully initialized git.
Installing packages for tooling via yarn.
Installed packages for tooling via yarn.
Successfully linked to @angular/cli.
Project 'learn-ng' successfully created.
$ cd learn-ng
$ npm start
The log given by the failure.
> [email protected] start /Users/javier/Documents/Proyectos/learn-ng
> 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/javier/.nvm/v6.10.0/lib/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/index.js:14:11)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/javier/.nvm/v6.10.0/lib/node_modules/@angular/cli/tasks/eject.js:10:19)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
Desired functionality.
Work out of the box
Mention any other details that might be useful.
$ ng new --style scss --routing true learn-ng
Works ok
The --link-cli option is intended for use only when developing the CLI itself. It does not provide any benefit otherwise.
thanks @clydin! Maybe'd be useful to state it clearly in the cli runtime or remove from "production" build and move to dev documentation?
@jmendiara agreed. I made this same mistake too following the upgrade instructions.
Same error here, any fix for this?
What is the solution , guys?
@jmendiara The --link-cli option should only be mentioned in the Development Hints section of the README. If it is erroneously located anywhere else please let us know, so that it can be corrected.
If the --link-cli option was used and you wish to reverse it in a generated app, you should be able to run npm unlink @angular/cli within project.
I have the same problem, any fix?
-- update the solution --
I solved installing the latest version of typescript
I have same problem, installing how "npm install -g typescript" and "npm install -g @angular/cli"
$ ng -v @angular/cli: 1.0.0 node: 7.8.0 os: linux x64 @angular/common: 4.0.1 @angular/compiler: 4.0.1 @angular/core: 4.0.1 @angular/forms: 4.0.1 @angular/http: 4.0.1 @angular/platform-browser: 4.0.1 @angular/platform-browser-dynamic: 4.0.1 @angular/router: 4.0.1 -->@angular/cli: error -->@angular/compiler-cli: error
my package.json
{ "name": "helloworld", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/common": "^4.0.0", "@angular/compiler": "^4.0.0", "@angular/core": "^4.0.0", "@angular/forms": "^4.0.0", "@angular/http": "^4.0.0", "@angular/platform-browser": "^4.0.0", "@angular/platform-browser-dynamic": "^4.0.0", "@angular/router": "^4.0.0", "core-js": "^2.4.1", "rxjs": "^5.1.0", "zone.js": "^0.8.4" }, "devDependencies": { "@angular/cli": "1.0.0", "@angular/compiler-cli": "^4.0.0", "@types/jasmine": "2.5.38", "@types/node": "~6.0.60", "codelyzer": "~2.0.0", "jasmine-core": "~2.5.2", "jasmine-spec-reporter": "~3.2.0", "karma": "~1.4.1", "karma-chrome-launcher": "~2.0.0", "karma-cli": "~1.0.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "karma-coverage-istanbul-reporter": "^0.2.0", "protractor": "~5.1.0", "ts-node": "~2.0.0", "tslint": "~4.5.0", "typescript": "~2.2.0" } }
I just create a new project without using quickstart of angular and it works!
2017-04-10 21:55 GMT-05:00 Diogo Alves Barbosa [email protected]:
I have same problem, installing how "npm install -g typescript" and "npm install -g @angular/cli"
/ \ _ __ __ _ _
| | __ _ _ __ / | | | | / △ \ | ' \ / _| | | | |/ _ | '| | | | | | | / ___ | | | | (| | || | | (| | | | | | |___ | | // __| ||_, |,|*|,|| _|**|*| |__/ @angular/cli: 1.0.0 node: 7.8.0 os: linux x64 @angular/common: 4.0.1 @angular/compiler: 4.0.1 @angular/core: 4.0.1 @angular/forms: 4.0.1 @angular/http: 4.0.1 @angular/platform-browser: 4.0.1 @angular/platform-browser-dynamic: 4.0.1 @angular/router: 4.0.1 -->@angular/cli: error -->@angular/compiler-cli: error
my package.json
{ "name": "helloworld", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/common": "^4.0.0", "@angular/compiler": "^4.0.0", "@angular/core": "^4.0.0", "@angular/forms": "^4.0.0", "@angular/http": "^4.0.0", "@angular/platform-browser": "^4.0.0", "@angular/platform-browser-dynamic": "^4.0.0", "@angular/router": "^4.0.0", "core-js": "^2.4.1", "rxjs": "^5.1.0", "zone.js": "^0.8.4" }, "devDependencies": { "@angular/cli": "1.0.0", "@angular/compiler-cli": "^4.0.0", "@types/jasmine": "2.5.38", "@types/node": "~6.0.60", "codelyzer": "~2.0.0", "jasmine-core": "~2.5.2", "jasmine-spec-reporter": "~3.2.0", "karma": "~1.4.1", "karma-chrome-launcher": "~2.0.0", "karma-cli": "~1.0.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "karma-coverage-istanbul-reporter": "^0.2.0", "protractor": "~5.1.0", "ts-node": "~2.0.0", "tslint": "~4.5.0", "typescript": "~2.2.0" } }
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular/angular-cli/issues/5790#issuecomment-293135536, or mute the thread https://github.com/notifications/unsubscribe-auth/AQTkyl61OqEJ_OvnqnrMpLyOLAx_Lyh4ks5ruuu7gaJpZM4MwZdP .
I had the same issue while I updated my project to angular 4. I updated the typescript ref in the devDependencies from "~2.0.0" to "~2.1.5". Issue solved.
thanks for response, I try to go with this info 👍
See http://stackoverflow.com/questions/43351136/the-angular-compiler-cli-package-was-not-properly-installed/43351137#43351137
In my case there was a problem with npm, it didn't install devDependencies. I found the solution here:
http://stackoverflow.com/questions/34700610/npm-install-wont-install-devdependencies
I check if npm config production value is set to true with:
npm config get production
If true, I set to false with:
npm config set -g production false
but I don't know why my npm was configured with the production value to true. I haven't set NODE_ENV environment variable, neither used the "--production" flag
I'm closing this issue because the original issue received answers by @clydin and now people are just reporting different problems. Please open new issues instead of replying to this one.
Finally found the solution see the below screenshots and steps to resolve this issue http://itechiesol.blogspot.com/2017/07/angular-compiler-cli-package-was-not.html
This works like magic
npm install --save-dev del
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.