Skip to content

Not saving update to latest CLI version 8 makes repeat attempts error-prone #16021

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

Closed
filipesilva opened this issue Nov 1, 2019 · 8 comments
Closed
Assignees
Labels
area: @angular/cli area: docs Related to the documentation
Milestone

Comments

@filipesilva
Copy link
Contributor

This issue impacts 9.0.0-rc.0 and happened while updating https://github.com/vmware/clarity.

In https://next.angular.io/guide/updating-to-version-9 the suggested update procedure is to follow these commands:

npm install --no-save @angular/cli@^8.3.15
ng update @angular/cli @angular/core --next

When the update procedure fails, a user will need to manually revert their repository to before the update (as described in #16020) and attempt to update again.

If the user forgets to run npm install --no-save @angular/cli@^8.3.15, they will end up an incorrect update.

It would be better to instruct users to save and commit their update to @angular/cli@^8.3.15 before proceeding in order to reduce mistakes in subsequent update attempts.

cc @StephenFluin @mgechev

@filipesilva filipesilva added area: docs Related to the documentation area: @angular/cli labels Nov 1, 2019
@filipesilva filipesilva added this to the 9.0.x milestone Nov 1, 2019
@StephenFluin
Copy link
Contributor

Is there any reason we aren't just asking people to ng update @angular/core@8 @angular/cli@8 prior to updating, rather than doing the no-save bump of the CLI?

@filipesilva
Copy link
Contributor Author

Discussed it with @clydin, we could do that but there wouldn't be any real benefit over just doing npm install and committing the changes.

On the other hand, it'd take longer, and we don't really test ng update on minors. Everything should be ok, but it doesn't sound wise to try right now.

So I think npm install @angular/cli@^8.3.15 followed by committing the update to git is the best approach.

@clydin
Copy link
Member

clydin commented Nov 4, 2019

Fully supporting and testing ng update for all update scenarios is something that I think we should definitely be doing moving forward.

Also, if there is a strong preference for only referencing ng update in the instructions, it is a possibility. Thinking about it some more and I do agree there is a elegance to the suggestion.

@StephenFluin
Copy link
Contributor

I prefer only referencing ng update as this command is more error-proof. Any time you go back to npm installs, you might miss a version or update (what if you were on 7 and you tried these instructions?), whereas ng update will work to keep the world in sync.

@vikerman
Copy link
Contributor

vikerman commented Nov 7, 2019

Doc change. Needs to be tried out.

@filipesilva
Copy link
Contributor Author

Still needs angular/angular-update-guide#40 before we can close.

@filipesilva filipesilva reopened this Nov 11, 2019
@alan-agius4
Copy link
Collaborator

Closing as the above mentioned PR was merged.

@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 Dec 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular/cli area: docs Related to the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants