-
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 / init broken on an existing project since beta.31 #4584
Comments
in my case first question was |
This is a bug in the current release... but it will be 'solved' as part of #4416, which should be in the next release. |
@filipesilva so what is the workaround for everybody that can't call ng update with beta.31? |
@victornoel no workaround per se. Moving forward, all changes that require user project changes should be in https://github.com/angular/angular-cli/blob/master/CHANGELOG.md Ironically enough, the single change that needed users to update code was left out of the changelog by accident. You can find it here: https://github.com/angular/angular-cli/pull/4587/files Other than that, to update now you should just need to follow the steps in https://github.com/angular/angular-cli#updating-angular-cli except for We'll remove those commands and the instructions soon. I'll reopen this issue though, a lot of people are running into the problem so it's more visible open. |
I've created a folder in the past where I add new dummy project each time a new version of Angular-Cli rolls out. Then copy over files to previous one's folder and see changes on git gui. |
Shouldn't those new instructions for the changes to Karma include the --save-dev flag? To update follow these steps in your project:
|
Right you are @jtsom! |
just now i met the question on windows too |
With ng update if you had your project under source control it was easy to update. Let ng update replace all files then with a git gui compare the changes and take the new ones that you want or leave your unchanged files. Not sure if this was the correct workflow but seemed to work pretty well. |
I agree with @splintercode, having to check the changelog to find and apply the minutiae that changed manually every time the CLI updates seems like a step backward. |
@splintercode |
Unless I am missing something, I think I tried In saying this, I'm agreeing with @splintercode, the way I update my projects is by running Now it seems that the command is misleading, because it brings default files even to app module / component etc. I agree, but I think this has largely increased by calling it The reasoning I was given for removing the tool and resorting to changelog instead is that the team expects no changes to these core files (or very minimal) after v 1.0 final - I honestly don't know what to think of this reasoning, as good or bad. It looks like this command is going away a tiny bit earlier than that anyway. |
It's gone a127cad. |
We're getting rid of ng update and init because for the last few betas, we've been entirely backward compatible. The only step needed is to npm install the new version locally (and save your package.json). Closing this. |
What happens if someone is upgrading from an older version like beta.19 or something where there were quite a lot of changes? I recently upgraded from beta.19 to beta.28/30/31 and am glad I did it when |
@hansl, I don't think you are right: the last few betas had breaking changes too. I always check |
In case someone is interested I use the following script to generate the diff (I'm not a fan of global installations):
(Quick and dirty, feel free to improve.) Edit: Updated to skip npm installation during |
@rkrisztian your kinda of script did the trick for me... after a line-by-line comparison... thanks! |
Is update.angular.io/ still a thing, because it suggests the |
@shiftgeist yes, that site is up to date. |
I ran into another issue doing an update, and the only indication of the change was in the update.angular.io site, buried in a paragraph - that the @ViewChild() decorator now takes a required second parameter. This also states that it would automatically update my code. It did not, and caused many errors, that I had to dig around to figure out that a second parameter was required now - nowhere else, in change notes that I found, had this breaking change.... |
There were several in the project and none of them were migrated. Was there a mention in a change log somewhere that that change was happening? None of the "new in Angular 8" articles I read mentioned it... would have saved a bunch of time... Thanks. |
It's in the deprecation guide, linked from the announcement post. It can also be reached from angular.io->releases->deprecation guide. It's a new page though, it wasn't there in version 7. |
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. |
OS
Mac OSX Sierra
Versions.
Repro steps.
During the update from
beta.30
tobeta.31
, runningng update
orng init
exits after asking me to overwriteREADME.md
.. No matter what option i choose, it just quits straight away without continuing further.The log given by the failure.
The text was updated successfully, but these errors were encountered: