-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Comments
Temporary workaround seems to be skipping the |
@markgoho-EDT, the
Doing
|
I updated the cli first with |
So, the |
I tried to run [[24;154R Invalid range: ">=2.3.0 <3.0.0||>=4.0.0" |
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: |
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" |
same for me, just did |
@IterationCorp - this doesn't update your configuration files then, which means your karma, tslint and angular config won't get updated at all. |
Same here,
|
try |
Same: Invalid range: ">=5.0.0" |
Same here: |
I had the same issue. Upgraded my angular packages manually |
Workaround:
|
This should have been checked before angular 6.0.0 was released. Now I have to downgrade everything. |
My workaround: seems to work :D |
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: 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 What I have installed so far:
My steps:
Then, just to be sure, run
This is what I've done, worked for me, maybe will work for someone else. I think the key step was installing the Note: I've just started this project, so no big changes for me, my dev env was almost pristine. |
I have updated my project to @angular/cli 6.0.0 and typescript to version 2.8.3. 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? Here's the dependencies in my my package.json: "dependencies": { |
If I run
But If I run |
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
optional if you have angular-material 5.4.2, ngx-translate 9.1.1, ng-bootstrap/ng-bootstrap 1.1.1:
5 If you use Observable and get the error:
Change: To
|
The main problem seems to be with Just don't forget the
I also needed to |
What I was doing:
|
I tried following the steps @Rumsha001 laid out but was still having "Invalid range" failures at the Overall, very frustrating, I've gotta say ... |
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. |
same problem with 6.0.2 what is going on. WARNING in ./node_modules/ng-http-loader/node_modules/@angular/core/esm2015/core.js |
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. |
@chriscurnow well. for me to update the angular from 5 to 6 I only needed this thread, ng-update guide and one day) |
I couldn't use |
@tolvaly How do you "1. Manually update the angular packages to 6.0"? |
"Manually" means that you should update packages using "npm install" instead of "ng update", like this:
|
Meanwhile I found out why updating doesn't work with Couple of example libraries that broke my update were:
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 And responding to your question, under manual update I mean, you have to change the version numbers in package.json manually and run Be aware, when updating rxjs to 6 you should follow this guide |
As for many others - after upgrading to angular 6 package.json held fixed |
Running below should help to update your dependencies to latest version.
|
I had a typescript version missmatch like many people (requires ">=2.7.2 <2.8", would install "2.8.3"). I also needed to install angular-devkit/build-angular as dev dependency This solved my problem. |
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"). in second time i used the following command to update the core library issue had fix when i use the following command with --force flag, now, my project library has been updated from version 4 to 6. Well done :) "dependencies": { Good Luck !!! |
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 |
@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 For |
I have the same issue with it.
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").
"dependencies": { |
|
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. |
npm install [email protected] (or the version you need) |
For future reference. I got frustrated trying so many "solutions" with no avail so I decided to just run the following command.
It was a wild gamble and took a while to update but now everything is working and my project is up-to-date. |
@kobusbeets I can't say it was a "wild gamble" though, not with a version control system. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Versions
Repro steps
ng update @angular/core
Observed behavior
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"
The text was updated successfully, but these errors were encountered: