ng update @angular/core fails
Versions
Angular CLI: 6.0.0
Node: 8.9.1
OS: win32 x64
Angular: 5.2.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.6.0
@angular-devkit/core 0.6.0
@angular-devkit/schematics 0.6.0
@angular/cli 6.0.0
@schematics/angular 0.6.0
@schematics/update 0.6.0
rxjs 5.5.10
typescript 2.6.2
Repro steps
- Follow steps at https://update.angular.io/
ng update @angular/core
Observed behavior
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.8", would install "2.6.2")
Invalid range: ">=4.3.0"
Desired behavior
I would expect this to work properly.
Mention any other details that might be useful (optional)
I tried to manually update the compiler-cli and run the update function again and got this:
$ ng update @angular/core
Invalid range: ">=4.3.0"
same Invalid range: ">=4.0.0"
I had to manually add the 6.0.0 to all angular components and 2.7.2 to typescript. then it worked.
@lakerko Yes, I did.
@isametal88 is your global tsc taking over?
tsc -v
I wasn't able to run that command, I tried with this one (it seems to do a similar thing)
npm list -g typescript
[..]
+-- @angular/[email protected]
| -- @schematics/[email protected]
| -- [email protected]
+-- [email protected]
| -- [email protected]
-- [email protected]
-- [email protected]
-- [email protected]
I doubled-check the typescript folder in node_modules and it is 2.7.2.
tsc -v message TS6029: Version 1.5.3
That version is way too old. Explains why your imports etc aren’t working. Your situation seems unrelated to the reported issue.
I installed tsc this morning. Which is the old package? I verified my package.json using npm-check and everything seems fine.
same here what is the official recommended way forward here? not giving much confidence in the hyped ng update.
@clement911 just don't npm update to latest the local angular cli before the ng update and you're ok.
Ran into the "Invalid range" error also, just trying to use ng update @angular/cli to update to 6.0.1, something I think should have been easy. Nope. Ended up doing an npm update to get 6.0.1, but still doing ng update @angular/core (because ng update said it needed to), I'm seeing
Invalid range: ">2.4.2"
No idea what is triggering this - it's pretty much a standard CLI app.
edit: Looks like it is trying to update the core angular packages to 6.0.1, but this error is causing the update to fail. As someone above said, doesn't instill much confidence. (I also ran into a pile of errors doing ng update on a moderately large app)
More info. trying to do ng update --all now returns:
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.8", would install "2.8.3")
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.8", would install "2.8.3").
Invalid range: ">2.4.2"
My package.json specifies:
"typescript": "2.7.2"
so it should not even be trying to update typescript...

Similar issues here. I just started a new Angular 6.0.0 project from CLI 6.0.0 a week ago.
I could update angular-cli to version 6.0.1 but doing
ng update @angular/core shows me
Invalid range: ">=5.0.0"
I have [email protected] and [email protected] installed
Anybody facing the same issue trying to update angular/core from 6.0.0 -> 6.0.1 ?
@ray-kay
I had a clean install of 6.0.0.
When running ng update --all to try update to the 6.0.1, here is the error I have:
Package "karma-jasmine-html-reporter" has a missing peer dependency of "jasmine" @ ">=3".
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.8", would install "2.8.3").
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.8", would install "2.8.3")
Incompatible peer dependencies found. See above.
My package.json contains "typescript": "2.7.2" in devDependencies. That makes no sens to me.
@ddahan I had the same issue before I think.
Could solve by just update the locale angular cli on its own:
ng update @angular/cli
Hope this will help with your issue. After that try:
ng update @angular/core and it should say:
Invalid range: ">=5.0.0"
I just run
npm update instead ng update and it updated Angular's packages to 6.0.1 without any issues.
Maybe an issue in the cli ng update dependency detection?
Except, for me anyway, when I initially updated to 6.0, the package.json items were set like “@angular/common”: “6.0.0” Locking it to that version. Npm update would not update anything.
Hey Everyone, After alot of research, I have come up with following solution and got success in updating my local project to Angular 6.0.1:
- npm install @angular/{animations,common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router}@'6.0.1'
- ng update rxjs
- npm install rxjs@6 rxjs-compat@6 --save
- ng update angular/core
- ng update angular/material
- npm install typescript@'>=2.7.0 <2.8.0'
Sorry for beeing so negative and off topic, but what's the point for Google to provide a new ng update command supposed to ease things if we need 58 comments in a an issue and 6 steps, to go from 6.0.0 to 6.0.1 in the end?
I gave up, I will update this later when tools will be less cumbersome to use.
The main problem seems to be with ng update --all not doing its job properly.
Following @Rumsha001 's approach seems to work well.
Just don't forget the @s:
ng update @angular/coreng update @angular/material
I also needed to ng update @angular/cli