Skip to content

angular cli update issue on local folder #4653

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
ashjha opened this issue Feb 13, 2017 · 16 comments
Closed

angular cli update issue on local folder #4653

ashjha opened this issue Feb 13, 2017 · 16 comments

Comments

@ashjha
Copy link

ashjha commented Feb 13, 2017

After updating angular cli as mention on github

Global package:

npm uninstall -g angular-cli @angular/cli
npm cache clean
npm install -g @angular/cli@latest

Local project package:

rm -rf node_modules dist # use rmdir on Windows
npm install --save-dev @angular/cli@latest
npm install
ng update

Running ng update will check for changes in all the auto-generated
files created by ng new and allow you to update yours. You are offered
four choices for each changed file: y (overwrite), n (don't
overwrite), d (show diff between your file and the updated file) and h
(help).

when i do ng update ???

demo@VSS-DT0094:~/Desktop/project-dev/client$ ng update
installing ng2
? Overwrite README.md? (yndH) y
>> Yes, overwrite

what to do next if i press Enter

it comes like this

demo@VSS-DT0094:~/Desktop/project-dev/client$ 

and doing again ng update

same result show

demo@VSS-DT0094:~/Desktop/project-dev/client$ ng update installing ng2
? Overwrite README.md? (yndH) y

@stevie6410
Copy link

stevie6410 commented Feb 13, 2017

Hi, I am getting this issue too. Have cleared and re-installed my node modules but the 'ng update' command only checks the Readme.md file and then finishes.

@Headcult
Copy link

Same issue here. Waiting for a fix for this.

@bitconym
Copy link

bitconym commented Feb 13, 2017

Same issue here, I think something is broken in the latest angular-cli version 1.0.0-beta.31.

@stevie6410
Copy link

stevie6410 commented Feb 13, 2017

Having said that, at least the recompile and browser refresh is working okay. Seems to be faster too 👍

@Headcult
Copy link

It looks like they are removing 'ng update and 'ng init' going forward as all new CLI changes are backward compatible from now, as per this comment on a similar issue on this: https://github.com/angular/angular-cli/issues/4584#issuecomment-279273790

#4584

@randyaa
Copy link

randyaa commented Feb 13, 2017

If they're removing it that's unfortunate, one of the biggest things for me was the init / update commands as it helped us stay in sync with the current templates/blueprints. I thought one of the goals was that those commands would get better and help us satisfy breaking changes in angular itself going forward?

@Meligy
Copy link
Contributor

Meligy commented Feb 13, 2017

The command is going away as going forward the team wants to have very little to no breaking changes at all between Angular Cli v1.0 final and v2.0 final. It's already gone in master.

The current way of replacing files is considered confusing by the team because it involves default empty files that you probably don't want to replace like app module / component, and mess with package.json / angular-cli.json etc.

It will be rewritten in a smarter way in v2.0 final.

@bastibense
Copy link

Can confirm this is not working anymore in beta 31. Works fine in beta 30.

@ukaaa
Copy link

ukaaa commented Feb 15, 2017

How can I update a project now that ng update doesn't work?

@stevie6410
Copy link

stevie6410 commented Feb 15, 2017

Yes, it would be nice if we can get the documentation updated to reflect this change and what the process would be until the fancy new v2 method comes along. I am not familiar with all the cli dependencies and wouldn't know what versions they should all be at to ensure they work together.

Although I guess I could just ng new a project, merge the package.json changes manually and then delete the new project?

@ukaaa
Copy link

ukaaa commented Feb 15, 2017

I've installed v1.0.0-beta.30 for now like @bastibense suggested.

@tomwanzek
Copy link

Ran into the same issue with beta.31. If ng update/ng init are no longer supported (at least during and interim period), it raises the question about differing pre-upgrade starting points.

My angular-cli-based projects do not all have the same pre-update cli version (I would mostly migrate from beta.26) .

I.p., if beta.30 was the last one to support the "traditional" migration approach, it seems I am now forced to

  • install beta.30 globally first,
  • migrate all of them to beta.30 using the traditional approach,
  • install beta.31,
  • migrate all apps manually using CHANGELOG installation instructions.

Is this really the suggested approach?

@bastibense
Copy link

I ended up creating a blank project from the base-app template repository (the one I assume the init script will clone as a basis). Then I diffed the package.json by hand to make the required adjustment.
IMHO the helper steps and automatic diffs were something I considered as a big feature of angular-cli, as it doesn't seem overly complex and solves the problem. On the other hand I understand that using a new versioning approach or release strategy reduced the need to do this manual updating all the time.
We'll see.

@ukaaa
Copy link

ukaaa commented Feb 20, 2017

I did the same as @bastibense. So far so good. It's really annoying though and I hope this is not the new flow to update existing projects. I know it's still in beta but you can't expect users to only make new projects with Angular CLI. Some of us have existing projects we want to keep as much in sync as possible with the latest Angular version.

@filipesilva
Copy link
Contributor

We're removed ng update/init and added an explicit upgrade doc for RCs that we're keeping updated: https://github.com/angular/angular-cli/wiki/stories-rc-update

@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants