Angular-cli: Is there a way to upgrade to ng4 ?

Created on 28 Feb 2017  路  8Comments  路  Source: angular/angular-cli

Hello,
First, I'm sorry it's probably not where I should write this but...

The Angular Team asked for us to test ng4 while it's in its RC version.
I would be glad to test it but I don't know how to upgrade it and I can't find any info about it.

Considering there is an --ng4 parameter to create an ng4 project with Angular CLI I doubt it's as easy as changing the version in the package.json. And even if it is, how can I know which version to pick ? I don't wanna set the version to the latest and run into trouble within a few days.

Thank you very much.

_Sorry for my English._

Most helpful comment

There are plans to implement a much more robust update process, nothing concrete, but certainly something we'll be working towards.

All 8 comments

It's as easy as changing version in package.json. ;) You can check the package.json from the blueprints to see what packages needs to be updated. It's simply all angular packages aswell as typescript..

See: https://github.com/angular/angular-cli/blob/1609554c4d04176041ddf7c0bcba68842c5695da/packages/%40angular/cli/blueprints/ng/files/package.json

Just updating myself and can see so much more than just package.json updates :) multiple tsconfigs being one thing. I miss the update command :(

@intellix As part of the blueprint, yes. However, your project will work just fine without those changes. ;)

You can also use ng new Ng4Empty --ng4 to create an empty project with Angular 4 dependencies and copy the new files you need.

Right now the upgrade path is a manual process, the previous commands were flawed and caused other issues. That being said there are several techniques above to assist with your migration, good luck.

@Brocco Do you plain to create an automatic update process ?

There are plans to implement a much more robust update process, nothing concrete, but certainly something we'll be working towards.

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._

Was this page helpful?
0 / 5 - 0 ratings