Versions of @angular/compiler-cli and typescript could not be determined.
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
ng 1.5.0 node 8.9.0 npm 5.5.1 yarn 1.3.2 visual studio code 1.17.2
Repro steps.
run ng serve or ng serve -aot
The log given by the failure.
Versions of @angular/compiler-cli and typescript could not be determined. The most common reason for this is a broken npm install.
Please make sure your package.json contains both @angular/compiler-cli and typescript in devDependencies, then delete node_modules and package-lock.json (if you have one) and run npm install again.
Desired functionality.
Mention any other details that might be useful.
here my package.json
{
"name": "migate",
"version": "0.1.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/animations": "^5.0.0",
"@angular/common": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0",
"bootstrap": "^4.0.0-beta.2",
"core-js": "^2.5.1",
"global": "^4.3.2",
"jquery": "^3.2.1",
"json-typescript-mapper": "^1.1.3",
"popper.js": "^1.12.6",
"roboto-fontface": "^0.8.0",
"rxjs": "^5.5.2",
"typescript-string-operations-ng4": "^0.1.0",
"zone.js": "^0.8.18"
},
"devDependencies": {
"@angular/cli": "^1.5.0",
"@angular/compiler": "^5.0.0",
"@angular/compiler-cli": "^5.0.0",
"@angular/language-service": "^5.0.0",
"@types/jasmine": "~2.6.2",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.0.47",
"codelyzer": "~4.0.0",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.2.0",
"ts-node": "~3.3.0",
"tslint": "~5.8.0",
"typescript": "~2.4.0",
"webpack": "^3.8.1",
"webpack-sources": "^1.0.1"
}
}
I have issues with ng serve as it returns the following..
Cannot find module '@angular/compiler-cli' Error: Cannot find module '@angular/compiler-cli'....
Then when I do ng version it returns these: Package Version
@angular-devkit/architect 0.10.6 (cli-only)
@angular-devkit/build-angular
But my package.json seems do have those: { "name": "testapp", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "~7.0.0", "@angular/common": "~7.0.0", "@angular/compiler": "~7.0.0", "@angular/core": "~7.0.0", "@angular/forms": "~7.0.0", "@angular/http": "~7.0.0", "@angular/platform-browser": "~7.0.0", "@angular/platform-browser-dynamic": "~7.0.0", "@angular/router": "~7.0.0", "core-js": "^2.5.4", "rxjs": "~6.3.3", "zone.js": "~0.8.26" }, "devDependencies": { "@angular-devkit/build-angular": "~0.10.0", "@angular/cli": "~7.0.6", "@angular/compiler-cli": "~7.0.0", "@angular/language-service": "~7.0.0", "@types/node": "~8.9.4", "@types/jasmine": "~2.8.8", "@types/jasminewd2": "~2.0.3", "codelyzer": "~4.5.0", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~3.0.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~1.1.2", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.4.0", "ts-node": "~7.0.0", "tslint": "~5.11.0", "typescript": "~3.1.6" } }
I tried removing package-lock.json and npm install but didn't help. Any idea why those packages have
Here's the result for npm install: \testapp> npm install npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor. npm notice created a lockfile as package-lock.json. You should commit this file. audited 39133 packages in 9.165s found 0 vulnerabilities
Addition notes: npm -v (6.4.1) & node -v (v10.13.0)
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.