ng update / init broken on an existing project since beta.31
See original GitHub issueOS
Mac OSX Sierra
Versions.
@angular/cli: 1.0.0-beta.31
node: 6.9.5
Repro steps.
During the update from beta.30
to beta.31
, running ng update
or ng init
exits after asking me to overwrite README.md
… No matter what option i choose, it just quits straight away without continuing further.
The log given by the failure.
$ ng update
installing ng2
? Overwrite README.md? Diff
$
$ ng update
installing ng2
? Overwrite README.md? Diff
$
$ ng update
installing ng2
? Overwrite README.md? Yes, overwrite
$
$ ng init
installing ng2
? Overwrite README.md? Diff
$
Issue Analytics
- State:
- Created 7 years ago
- Reactions:29
- Comments:26 (13 by maintainers)
Top Results From Across the Web
'ng serve' does not work after a double install - Stack Overflow
It seems like you're using a project generated using an old version of the Angular CLI. The latest CLI now uses webpack and...
Read more >ng update - Angular
Perform a basic update to the current stable release of the core framework and CLI by running the following command. ... To update...
Read more >the specified command update is invalid. for available options, see ...
ng update @angular/cli --from=1.7.4 --migrate-only. I hope you find this helpful. Open side panel. The specified command i is invalid. For available options ......
Read more >Updating angular-cli Projects - Medium
April 2017 — Tutorial to update Angular-CLI 0.0.x to 1.0.0. ... Running ng init with the proper parameters guided you through a update...
Read more >Troubleshooting Omnibus GitLab installation issues
Reconfigure shows an error: NoMethodError - undefined method '[]=' for nil:NilClass. You ran sudo gitlab-ctl reconfigure or package upgrade triggered the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
Unless I am missing something, I think I tried
ng init
/ng update
in a beta.30 CLI project on Windows, I didn’t havereadme
in that project so the file it asked to replace was different (I think it wasindex.html
), then it just ended. I looked at my git and found that the files were changed, and I was able to upgrade my project.In saying this, I’m agreeing with @splintercode, the way I update my projects is by running
ng init
, accepting all core files (tslint, tsconfig, editorconfig, test.ts, karma.conf.js, package.json, polyfills, main.ts, etc.) and then going to git to undo the changes I don’t want.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
ng update
. It was more predictable and making more sense to have these effects when it was calledng init
.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.