Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.1.1 <3.2", would install "3.2.1")
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [x] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
Node Version: v8.11.4
npm Version: 6.4.1
ng Version:
Angular CLI: 7.0.4
Node: 8.11.4
OS: win32 x64
Angular: 7.0.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.10.4
@angular-devkit/build-angular 0.10.4
@angular-devkit/build-optimizer 0.10.4
@angular-devkit/build-webpack 0.10.4
@angular-devkit/core 7.0.4
@angular-devkit/schematics 7.0.4
@angular/cli 7.0.4
@ngtools/webpack 7.0.4
@schematics/angular 7.0.4
@schematics/update 0.10.4
rxjs 6.3.3
typescript 3.1.6
webpack 4.19.1
Repro steps
ng update --all
The log given by the failure
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.1.1 <3.2", would install "3.2.1")
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.1.1 <3.2", would install "3.2.1").
Incompatible peer dependencies found. See above.
Desired functionality
Mention any other details that might be useful
EVERY SINGLE TIME
i really don't get this, what is the use of "ng update" when it is not really usable at all? Why is something that updates angular that understands angular not be able to leave typescript alone or upgrade it to the latest supported version?
ng update --all --force ~~npm install [email protected] --save-exact~~ (you don't even need this anymore with angular 8.2.0, it works with the latest [email protected])
That's my version of ng update.
ng update --all --force ~npm install [email protected] --save-exact~ (you don't even need this anymore with angular 8.2.0, it works with the latest [email protected])
That's my version of ng update.
This is not an option since versions always are bumping. E.g. now it states that @angular/core conflicts with latest zone.js version and tsickle conflicts with latest typescript version.
ng update definetly should take care of its own dependencies at least.
I was having trouble starting npm install. [- ERROR in The Angular Compiler requires TypeScript> = 3.4.0 and <3.6.0 but 3.6.3 was found instead.]
- The commands:
- ng update --all --force
- npm install typescript @ "> = 3.1 <3.6"
- npm strat (success)
Thanks for the help.
package.json
{ "name": "my-project", "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": "~8.2.6", "@angular/common": "~8.2.6", "@angular/compiler": "~8.2.6", "@angular/core": "~8.2.6", "@angular/forms": "~8.2.6", "@angular/platform-browser": "~8.2.6", "@angular/platform-browser-dynamic": "~8.2.6", "@angular/router": "~8.2.6", "core-js": "^3.2.1", "rxjs": "~6.5.3", "tslib": "^1.10.0", "zone.js": "~0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.803.4", "@angular/cli": "~8.3.4", "@angular/compiler-cli": "~8.2.6", "@angular/language-service": "~8.2.6", "@types/jasmine": "~3.4.0", "@types/jasminewd2": "~2.0.6", "@types/node": "~12.7.5", "codelyzer": "~5.1.0", "jasmine-core": "~3.4.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~2.1.0", "karma-jasmine": "~2.0.1", "karma-jasmine-html-reporter": "^1.4.2", "protractor": "~5.4.2", "ts-node": "~8.3.0", "tslint": "~5.20.0", "typescript": "^3.5.3" } }
Very similar to what I have in my package.json file:
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"update": "ng update --all --force && npm install [email protected] && npm install [email protected]"
},
Saves me the headache of updating.
Very similar to what I have in my package.json file:
"scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "update": "ng update --all --force && npm install [email protected] && npm install [email protected]" },Saves me the headache of updating.
Thank you! But isn't typescipt supposed to be in the dev dependencies?
Actually I have several projects. One of my projects couldn't solve. So I copy all app models and components and paste it to the success project and then do some necessary steps. npm install -g @angluar/cli ng update --all --force is works for me
@asalam345 this works for now, but not when a new TS version will come out. The CLI will just happily upgrade your packages to a version of TS that is incompatible with Angular.
@asalam345 this works for now, but not when a new TS version will come out. The CLI will just happily upgrade your packages to a version of TS that is incompatible with Angular.
then need to update all I think.
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.