Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng update @angular/core fails #10621

Closed
markgoho-EDT opened this issue May 4, 2018 · 83 comments
Closed

ng update @angular/core fails #10621

markgoho-EDT opened this issue May 4, 2018 · 83 comments

Comments

@markgoho-EDT
Copy link

markgoho-EDT commented May 4, 2018

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

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"
@markgoho-EDT
Copy link
Author

Temporary workaround seems to be skipping the ng update @angular/cli step and instead runing ng update alone first. This seems to update the core (including CLI) but doesn't touch the angular-cli.json file. Then, upon running ng update @angular/cli it does that upgrade process.

@lordgreg
Copy link

lordgreg commented May 4, 2018

@markgoho-EDT, the ng update itself doesn't do anything else as showing the packages that have to be updated:

ng update
    We analyzed your package.json, there are some packages to update:

      Name                               Version                  Command to update
     --------------------------------------------------------------------------------
      @angular/core                      5.0.5 -> 6.0.0           ng update @angular/core
      @angular/material                  5.2.0 -> 6.0.0           ng update @angular/material
      rxjs                               5.5.2 -> 6.1.0           ng update rxjs


    There might be additional packages that are outdated.
    Or run ng update --all to try to update all at the same time.

Doing ng update --all isn't doing its job either:

ng update --all
                  Package "karma-jasmine-html-reporter" has a missing peer dependency of "jasmine" @ "^3.0.0".
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.8", would install "2.8.3")
                  Package "@auth0/angular-jwt" has an incompatible peer dependency to "@angular/common" (requires "^4.4.6||^5.0.0", would install "6.0.0")
                  Package "ng2-pdf-viewer" has a missing peer dependency of "pdfjs-dist" @ "2.0.489".
Invalid range: ">=6.0.0-rc.0"

@Jrubzjeknf
Copy link

I updated the cli first with ng update @angular/cli. Running ng update @angular/core after that gives me the error Invalid range: ">=4.3.0||>5.0.0".

@lordgreg
Copy link

lordgreg commented May 4, 2018

So, the Invalid range: ... doesn't say much. It could at least state from which package.json (aka from which node module this is coming from)

@bop10
Copy link

bop10 commented May 4, 2018

I tried to run ng update @angular/core after updating the cli and my terminal shows this:

[[24;154R

Invalid range: ">=2.3.0 <3.0.0||>=4.0.0"

@Theo59
Copy link

Theo59 commented May 4, 2018

Same here. I tried to different versions of Typescript (2.4, 2.6, 2.7, 2.8) and i get different "Invalid range" error each time:
Invalid range: ">=5.0.0"
Invalid range: ">=2.3.1 <3.0.0||>=4.0.0"
Invalid range: ">=4.3.0||>5.0.0"

@gnujeremie
Copy link

It's always such a pain in the a** to update node packages, ffs.

Same : Invalid range: ">=2.3.1 <3.0.0||>=4.0.0"

@IterationCorp
Copy link

same for me, just did
npm install @angular/[email protected]
npm install @angular/[email protected]
...
for all @angular/... package and it was ok

@lordgreg
Copy link

lordgreg commented May 4, 2018

@IterationCorp - this doesn't update your configuration files then, which means your karma, tslint and angular config won't get updated at all.

@kublaios
Copy link

kublaios commented May 4, 2018

Same here,

$ ng update --all
                  Package "angular2-moment" has an incompatible peer dependency to "@angular/core" (requires ">=2.0.0 <6.0.0", would install "6.0.0")
                  Package "countup.js-angular2" has an incompatible peer dependency to "ts-node" (requires "~3.2.0", would install "6.0.2").
                  Package "bootstrap" has a missing peer dependency of "popper.js" @ "^1.14.3".
                  Package "ng2-dnd" has an incompatible peer dependency to "@angular/core" (requires "^4.0.0 || ^5.0.0", would install "6.0.0")
Invalid range: ">=4.0.1||>5.0.0||<=6.0.0"

@elvisbegovic
Copy link
Contributor

try ng update --all --force but even ng update seems still in beta step or out of scope

@MarkStega
Copy link

Same: Invalid range: ">=5.0.0"

@PierreRoudaut
Copy link

Same here: Invalid range ">2.4.2"

@frohrka
Copy link

frohrka commented May 4, 2018

I had the same issue. Upgraded my angular packages manually yarn add @angular/$PACKAGE, run ng update @angular/core again.

@tolvaly
Copy link

tolvaly commented May 4, 2018

Workaround:

  1. Update manually the angular packages to 6.0.0
  2. ng update rxjs
  3. ng update angular/core
  4. ng update angular/material
  5. if ng update installs typescript 2.8.3 you have to install typescript version 2.7.2. angular compiler doesn;t work with 2.8.3

@bluefire2121
Copy link

This should have been checked before angular 6.0.0 was released. Now I have to downgrade everything.

@Mallfurion
Copy link

My workaround:
remove @angular/compiler-cli from package.json
run ng update @angular/core
npm i --save-dev @angular/compiler-cli@latest

seems to work :D

@JuanHB
Copy link

JuanHB commented May 7, 2018

I was experiencing the same problem reported by @markgoho-EDT, with some changes I was able to fix it, bellow you can see my steps, maybe it will help someone else.

The error message:
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.8", would install "2.6.2")

I was following along the steps from the https://update.angular.io page, but the above error poped when I was trying to run the ng update @angular/core bit.

What I have installed so far:

  • Angular CLI (local and global): 6.0.0
  • Typescript: 2.8.3

My steps:

$ ng update

  Name                               Version                  Command to update
 --------------------------------------------------------------------------------
  @angular/core                      5.2.10 -> 6.0.0          ng update @angular/core
  rxjs                               5.5.10 -> 6.1.0          ng update rxjs


There might be additional packages that are outdated.
Or run ng update --all to try to update all at the same time.

$ ng update --all

Package "karma-jasmine-html-reporter" has a missing peer dependency of "jasmine" @ "^3.0.0".
Package "@angular/platform-browser-dynamic" has a missing peer dependency of "@angular/compiler" @ "6.0.0".

$ ng update @angular/core

Package not installed: "@angular/compiler". Skipping.

$ ng update @angular/compiler

Package not installed: "@angular/compiler". Skipping.

$ npm install @angular/compiler -> the compiler was installed, but the version was 5.2.0

+ @angular/[email protected]
removed 7 packages and updated 1 package in 11.763s

$ ng update core -> worked fine, no messages this time

Then, just to be sure, run $ ng update again, and got:

We analyzed your package.json and everything seems to be in order. Good work!

This is what I've done, worked for me, maybe will work for someone else. I think the key step was installing the @angular/compiler again, to force its update.

Note: I've just started this project, so no big changes for me, my dev env was almost pristine.

@bbuehrer
Copy link

bbuehrer commented May 8, 2018

I have updated my project to @angular/cli 6.0.0 and typescript to version 2.8.3.
Now with 'ng build' i have the following error:

ERROR in The Angular Compiler requires TypeScript >=2.7.2 and <2.8.0 but 2.8.3 was found instead.

What is the reason?
What can i do?

Here's the dependencies in my my package.json:

"dependencies": {
"@angular/animations": "^6.0.0",
"@angular/common": "^6.0.0",
"@angular/compiler": "^6.0.0",
"@angular/core": "^6.0.0",
"@angular/forms": "^6.0.0",
"@angular/http": "^6.0.0",
"@angular/platform-browser": "^6.0.0",
"@angular/platform-browser-dynamic": "^6.0.0",
"@angular/platform-server": "^6.0.0",
"@angular/router": "^6.0.0",
"@angular/service-worker": "^6.0.0",
"@ng-idle/core": "^2.0.0-beta.15",
"base64-arraybuffer": "^0.1.5",
"core-js": "^2.5.6",
"font-awesome": "~4.7.0",
"intl": "~1.2.5",
"lodash": "^4.17.10",
"ng2-simple-timer": "^1.3.3",
"ngx-cookie-service": "^1.0.10",
"npm": "^6.0.0",
"primeng": "^5.2.6",
"primeng-extensions-wizard": "~2.2.0",
"rxjs": "^6.1.0",
"web-animations-js": "~2.3.1",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.6.0",
"@angular/cli": "^6.0.0",
"@angular/compiler-cli": "^6.0.0",
"@types/jasmine": "^2.8.7",
"@types/lodash": "^4.14.108",
"@types/node": "^10.0.4",
"codelyzer": "^4.3.0",
"jasmine-core": "~3.1.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^2.0.2",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.4.2",
"karma-jasmine": "^1.1.2",
"karma-jasmine-html-reporter": "^1.0.0",
"protractor": "^5.3.1",
"ts-node": "^6.0.3",
"tslint": "^5.10.0",
"typescript": "^2.8.3"
}

@matteomason
Copy link

If I run ng update I get this result

We analyzed your package.json, there are some packages to update:
Name                               Version                  Command to update
--------------------------------------------------------------------------------
@angular/core                      5.0.5 -> 6.0.0           ng update @angular/core
rxjs                               5.5.10 -> 6.1.0          ng update rxjs

But If I run ng update @angular/core , I get Invalid range: ">=2.0.0"

@RyanYizhaoHuang
Copy link

RyanYizhaoHuang commented May 8, 2018

This is how I make it work.

My Environment:

Angular CLI Global : 6.0.0, Local: 1.7.4, Angular: 5.2, Typescript: 2.5.3

Note: To enable ng Update you need to install Angular CLI 6.0 first
npm install -g @angular/cli or npm install @angular/cli

  1. ng update //update Angular Package core/common/complier... to 6.0.0

  2. ng update @angular/cli //change angular-cli.json to angular.json

optional if you have angular-material 5.4.2, ngx-translate 9.1.1, ng-bootstrap/ng-bootstrap 1.1.1:

  1. ng update @angular/material //upgrade to 6.0.1

  2. npm install @ngx-translate/[email protected] --save //upgrade ngX translate to 10.0.1 for Angular 6

5 npm install --save @ng-bootstrap/[email protected] //for ng-bootstrap

If you use Observable and get the error:

ERROR in node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'. node_modules/rxjs/observable/of.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/observable/of'.

Change: import { Observable } from "rxjs/Observable"; import { of } from 'rxjs/observable/of';

To

import { Observable, of } from "rxjs";

@dunxen
Copy link

dunxen commented May 15, 2018

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:

  1. ng update @angular/core
  2. ng update @angular/material

I also needed to ng update @angular/cli

@Tyrcheg
Copy link

Tyrcheg commented May 16, 2018

What I was doing:

  1. Follow "Before updating guide" from https://update.angular.io/
  2. Then set a typescript package version to 2.7.2 (yarn upgrade [email protected])
  3. yarn add global @angular/cli
  4. ng update @angular/cli
  5. yarn add @angular/cli
  6. Then continue following the guide
  7. ??????
  8. profit

@rogercoder
Copy link

I tried following the steps @Rumsha001 laid out but was still having "Invalid range" failures at the ng update @angular/core step. Then I changed step 1 to use version '6.0.2' and finally things worked. No guarantees this was the magic touch though ... I tried many things tonight, in various orders, etc.

Overall, very frustrating, I've gotta say ...

@jtsom
Copy link
Contributor

jtsom commented May 16, 2018

I know this is "closed" with a "fix" in place, but trying to ng update to 6.0.2 produces the same "invalid range" error. ng update is more of a problem that it's solving at the moment.

Brocco pushed a commit to angular/devkit that referenced this issue May 16, 2018
@uvconnects
Copy link

same problem with 6.0.2 what is going on.
`WARNING in ./node_modules/ng-http-loader/node_modules/@angular/core/esm2015/core.js
5354:15-36 Critical dependency: the request of a dependency is an expression

WARNING in ./node_modules/ng-http-loader/node_modules/@angular/core/esm2015/core.js
5370:15-102 Critical dependency: the request of a dependency is an expression`

@chriscurnow
Copy link

It certainly looks like ng update needs more work.

But people complaining here should have been around when Angular (2) was still in alpha. It was pretty hairy back then with breaking changes every couple of days sometimes.

That experience taught me it was worth sticking with Angular. It just gets better all the time. Sure a new feature like ng update might not work for everyone straight out of the box but I think we can all rest assured the engineers at Google will be working on it until they get it pretty well right.

Also remember updating from v5 to v6 is going to be a pretty huge task to accomplish with a single tool. After we have updated to v6, I'm sure the update process for future versions will be a whole lot better.

@Tyrcheg
Copy link

Tyrcheg commented May 18, 2018

@chriscurnow well. for me to update the angular from 5 to 6 I only needed this thread, ng-update guide and one day)

@BarnT
Copy link

BarnT commented May 18, 2018

I couldn't use ng update @angular/core to upgrade to 6.0.2 (because of the non-sense "Invalid range..." error message). Then @angular/cli 6.0.3 has been released. After updating to @angular/cli 6.0.3 all ng update ... command worked well!

yogeshgadge added a commit to yogeshgadge/ngx-cbp-theme that referenced this issue May 18, 2018
@alberthendriks
Copy link

@tolvaly How do you "1. Manually update the angular packages to 6.0"?
I tried "ng update @angular/[email protected]" but (after waiting 10 minutes) I get the same error.

@BarnT
Copy link

BarnT commented May 25, 2018

@tolvaly How do you "1. Manually update the angular packages to 6.0"?
I tried "ng update @angular/[email protected]" but (after waiting 10 minutes) I get the same error.

"Manually" means that you should update packages using "npm install" instead of "ng update", like this:

npm install @angular/[email protected] --save
npm install @angular/[email protected] --save
etc...

@tolvaly
Copy link

tolvaly commented May 25, 2018

@alberthendriks
How do you "1. Manually update the angular packages to 6.0"?
I tried "ng update @angular/[email protected]" but (after waiting 10 minutes) I get the same error.

Meanwhile I found out why updating doesn't work with ng update. It's because of 3rd-party libraries witch depends on angular.
You have to find out witch of them is breaking your update, and you have to update them manually to the latest version witch support angular and rxjs 6. You have to analyse your package.json, check each dependency under "dependencies". This is also a good opportunity to throw out old libraries witch aren't used or maintained anymore!

Couple of example libraries that broke my update were:

  • @ angular/flex-layout; Currently latest version: 6.0.0-beta.15
  • ng2-signalr; Currently latest version: 6.0.0
  • @ ngx-translate/core; Currently latest version: 10.0.2
  • ngx-moment; Currently latest version: 2.0.0

Until today all of them released a new version supporting angular6, and today I managed to update my packages to angular 6.0.5 running ng update @angular/cli without any issue. I was using angular/cli version 6.0.5

And responding to your question, under manual update I mean, you have to change the version numbers in package.json manually and run npm install to update the outdated packages.

Be aware, when updating rxjs to 6 you should follow this guide

@AmebaBrain
Copy link

As for many others - after upgrading to angular 6 package.json held fixed "6.0.0" version. Manually switching it to "^6.0.0" and executing npm install @angular/{core,forms,...,router} succesfully updates packages

@rcadhikari
Copy link

Running below should help to update your dependencies to latest version.

npm i -g npm-check-updates
ncu -u
npm install

@alexislargaiolli
Copy link

I had a typescript version missmatch like many people (requires ">=2.7.2 <2.8", would install "2.8.3").
My package.json contained typescript 2.7.2 but my package-lock.json contained typescript 2.9...
I remove this entry from package-lock.json and i run npm install [email protected]

I also needed to install angular-devkit/build-angular as dev dependency npm install --save-dev @angular-devkit/build-angular

This solved my problem.

@devssharma
Copy link

I could have faced incompatible peer dependency issues when i ran the command ng update @angular/core to update the core library of the existing angular project.

Issues

Package "@angular/cdk" has an incompatible peer dependency to "@angular/common" (requires ">=5.0.0-rc.0 <6.0.0||>=4.0.0 <5.0.0", would install "6.0.0").
Package "codelyzer" has an incompatible peer dependency to "@angular/core" (requires ">=5.0.0-rc.0 <6.0.0||>=2.3.1 <3.0.0||>=4.0.0-beta <5.0.0", would install "6.0.0").
Package "codelyzer" has an incompatible peer dependency to "@angular/compiler" (requires ">=5.0.0-rc.0 <6.0.0||>=2.3.1 <3.0.0||>=4.0.0-beta <5.0.0", would install "6.0.0").

in second time i used the following command to update the core library
ng update --next but still there an issue.

issue had fix when i use the following command with --force flag,
ng update @angular/core --next --force

now, my project library has been updated from version 4 to 6. Well done :)

"dependencies": {
"@angular/animations": "^6.0.0",
"@angular/cdk": "^2.0.0-beta.8",
"@angular/common": "^6.0.0",
"@angular/compiler": "^6.0.0",
"@angular/core": "^6.0.0",
"@angular/forms": "^6.0.0",
"@angular/http": "^6.0.0",
"@angular/material": "^2.0.0-beta.8",
"@angular/platform-browser": "^6.0.0",
"@angular/platform-browser-dynamic": "^6.0.0",
"@angular/router": "^6.0.0",
"core-js": "^2.4.1",
"rxjs": "^6.2.0",
"zone.js": "^0.8.26",
"rxjs-compat": "^6.0.0-rc.0"
},

Good Luck !!!

@ZeeshanQurban
Copy link

I have facing incompatible peer dependency issues when i ran the command ng update @angular/core to update the core library of the existing angular project.

Package "angulartics2" has an incompatible peer dependency to "@angular/router" (requires ">=7.0.0-rc.0 <8.0.0||>=4.4.0 <=6.0.0", would install "6.0.5").

Package "codelyzer" has an incompatible peer dependency to "@angular/compiler" (requires ">=5.0.0-rc.0 <6.0.0||>=2.3.1 <3.0.0||>=4.0.0-beta <5.0.0", would install "6.0.5").

can some one help on this

@benjamincharity
Copy link

benjamincharity commented Jun 19, 2018

@ZeeshanQurban From the message it seems that both of those libraries are specifically disallowing the 6.x.x version range.

I'm not personally using these, but from what I can see:

For angulartics2 it looks like they moved to support Angular 6.x when they released version 6 of the package: https://github.com/angulartics/angulartics2/releases/tag/v6.0.0

For codelyzer it seems they should be supporting Angular 6.x starting with 4.2.1: mgechev/codelyzer@3112b38

@nalvadesharayu29
Copy link

nalvadesharayu29 commented Jul 10, 2018

I have the same issue with it.

ng update @angular/core

Package "ngx-bootstrap" has an incompatible peer dependency to "@angular/forms" (requires ">=7.0.0-rc.0 <8.0.0||6.0.1", would install "6.0.7").
Incompatible peer dependencies found. See above.

Package.json

"dependencies": {
"@angular/animations": "^6.0.0",
"@angular/common": "^6.0.0",
"@angular/compiler": "^6.0.0",
"@angular/core": "^6.0.0",
"@angular/forms": "^6.0.0",
"@angular/http": "^6.0.0",
"@angular/platform-browser": "^6.0.0",
"@angular/platform-browser-dynamic": "^6.0.0",
"@angular/router": "^6.0.0",
"@auth0/angular-jwt": "^2.0.0",
"alertifyjs": "^1.11.1",
"bootstrap": "^4.1.1",
"bootswatch": "^4.1.1",
"core-js": "^2.5.4",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"jquery": "^1.12.4",
"ng2-file-upload": "^1.3.0",
"ngx-bootstrap": "^3.0.0",
"ngx-gallery": "^5.3.2",
"popper.js": "^1.14.3",
"rxjs": "^6.2.1",
"time-ago-pipe": "^1.3.2",
"underscore": "^1.9.1",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.6.1",
"@angular/cli": "^6.0.8",
"@angular/compiler-cli": "^6.0.0",
"@angular/language-service": "^6.0.0",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"@types/underscore": "^1.8.8",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~1.4.2",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "~2.7.2"
}

@qlstudent
Copy link

cl-pur-w7-04:freeride.gitlab.io student$ ng update --all
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.10", would install "3.0.1").
Incompatible peer dependencies found. See above.
cl-pur-w7-04:freeride.gitlab.io student$ ng update @angular/cli
    Updating package.json with dependency @angular/cli @ "6.1.2" (was "6.0.8")...
UPDATE package.json (1500 bytes)

> [email protected] install /Users/student/src/freeride.gitlab.io/node_modules/fsevents
> node install

[fsevents] Success: "/Users/student/src/freeride.gitlab.io/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> [email protected] install /Users/student/src/freeride.gitlab.io/node_modules/node-sass
> node scripts/install.js

Cached binary found at /Users/student/.npm/node-sass/4.9.0/darwin-x64-64_binding.node

> [email protected] postinstall /Users/student/src/freeride.gitlab.io/node_modules/node-sass
> node scripts/build.js

Binary found at /Users/student/src/freeride.gitlab.io/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Testing binary
Binary is fine
added 1173 packages from 1293 contributors and audited 21839 packages in 40.852s
found 14 vulnerabilities (9 low, 5 high)
  run `npm audit fix` to fix them, or `npm audit` for details
cl-pur-w7-04:freeride.gitlab.io student$ ng serve
^C
cl-pur-w7-04:freeride.gitlab.io student$ ls -a
.			.git			angular.json		package.json		tslint.json
..			.gitignore		e2e			sketch
.DS_Store		.gitlab-ci.yml		node_modules		src
.editorconfig		README.md		package-lock.json	tsconfig.json
cl-pur-w7-04:freeride.gitlab.io student$ ng update --all
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.10", would install "3.0.1")
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.10", would install "3.0.1").
Incompatible peer dependencies found. See above.
cl-pur-w7-04:freeride.gitlab.io student$ ng update
    We analyzed your package.json, there are some packages to update:

      Name                               Version                  Command to update
     --------------------------------------------------------------------------------
      @angular/core                      6.0.3 -> 6.1.1           ng update @angular/core
      rxjs                               6.2.0 -> 6.2.2           ng update rxjs


    There might be additional packages that are outdated.
    Or run ng update --all to try to update all at the same time.

cl-pur-w7-04:freeride.gitlab.io student$ ng update --all
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.10", would install "3.0.1")
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.10", would install "3.0.1").
Incompatible peer dependencies found. See above.
cl-pur-w7-04:freeride.gitlab.io student$ npm install
audited 21839 packages in 8.918s
found 14 vulnerabilities (9 low, 5 high)
  run `npm audit fix` to fix them, or `npm audit` for details
cl-pur-w7-04:freeride.gitlab.io student$ ng update --all
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.10", would install "3.0.1")
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.10", would install "3.0.1").
Incompatible peer dependencies found. See above.
cl-pur-w7-04:freeride.gitlab.io student$

@CraigWarford
Copy link

I gotta say, the rabbit hole on this issue is a little nuts. I'm trying an ng update from 6.0.2 to 6.2.4, and I've chased through several missing packages that were apparently added in between those two versions. I started with @angular-devkit/build-angular, but then also hit clean-css, compression and dom-converter. I got stuck on the last two, because attempting to install either one states that the other one is missing. ng update is a big fat fail for me. There should be something to detect missing packages between versions, and install those as part of the ng update process. Otherwise, it's faster to create a project from scratch and manually copy everything over.

@gaelganlut
Copy link

gaelganlut commented Oct 20, 2018

npm install [email protected] (or the version you need)
then ng update @angular/core worked for me
Good luck guys

@kobusbeets
Copy link

For future reference. I got frustrated trying so many "solutions" with no avail so I decided to just run the following command.

$ ng update --all --force

It was a wild gamble and took a while to update but now everything is working and my project is up-to-date.

@daverickdunn
Copy link

ng update --all --force worked for me also.

@kobusbeets I can't say it was a "wild gamble" though, not with a version control system.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests