You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
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?
Reacted by Vik Sunkavalli, agatsoh and Ricardo Varanda
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.
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?
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.
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.
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.
Activity
stevie6410 commentedon 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 commentedon Feb 13, 2017
Same issue here. Waiting for a fix for this.
bitconym commentedon Feb 13, 2017
Same issue here, I think something is broken in the latest angular-cli version 1.0.0-beta.31.
stevie6410 commentedon Feb 13, 2017
Having said that, at least the recompile and browser refresh is working okay. Seems to be faster too 👍
Headcult commentedon Feb 13, 2017
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 commentedon 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 commentedon 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 commentedon Feb 14, 2017
Can confirm this is not working anymore in beta 31. Works fine in beta 30.
ukaaa commentedon Feb 15, 2017
How can I update a project now that
ng updatedoesn't work?stevie6410 commentedon 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 newa project, merge the package.json changes manually and then delete the new project?ukaaa commentedon Feb 15, 2017
I've installed v1.0.0-beta.30 for now like @bastibense suggested.
tomwanzek commentedon Feb 16, 2017
Ran into the same issue with beta.31. If
ng update/ng initare 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
Is this really the suggested approach?
bastibense commentedon Feb 17, 2017
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 commentedon 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 commentedon Mar 9, 2017
We're removed
ng update/initand added an explicit upgrade doc for RCs that we're keeping updated: https://github.com/angular/angular-cli/wiki/stories-rc-updateangular-automatic-lock-bot commentedon Sep 6, 2019
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.