How to install the latest angular-cli?
I found the latest version in github is 1.0.0-beta.30. But it always show my version is 1.0.0-beta.28.3 when I try:
sudo npm i -g angular-cli
What could be wrong? Thanks
npm install -g @angular/cli@latest
Docs need to be updated
There is a pull request open for the docs: #4349
You can run these two snippets to upgrade from angular-cli to the new package @angular/cli.
npm uninstall -g angular-cli
npm cache clean
npm install -g @angular/cli@latest
rm -rf node_modules dist
npm uninstall --save-dev angular-cli
npm install --save-dev @angular/cli@latest
npm install
ng update
@grizzm0 Are you not a fan of ng init? 😛
@RicardoVaranda The README says ng update nowdays. ;) Pretty sure it used to say ng init tho.
Thanks. Previously I run: npm i -g angular-cli. I think this is the reason.
I'll have to check it out properly, I like the way init makes the second part of your previous post much easier in my opinion I guess it's all a matter of preference :)
@RicardoVaranda you still need to install the new version of the global cli via the npm commands.
Of course, if you read my last comment I simply stated it makes the second part easier, the first part is essential regardless of your choice on upgrade.
After installing latest version I still have a angular-cli folder with two folders inside
- ast-tools
- base-href-webpack
is this as defined?
Closing as answered.
First You uninstall the old version of the CLI globally, cleared cache, and then installed the new version CLI globally, following these instructions:
npm uninstall -g angular-cli @angular/cli
npm cache clean
npm install -g @angular/cli@latest
Can anybody help me.I am unable to install CLI.
What problem are you facing @Mitali-Mahanta
Now @angular/cli is working,i reinstall the nodejs latest version(v6.11.1).
This can help you to update the package versions of package.json to the last version https://www.npmjs.com/package/npm-check-updates
https://github.com/angular/angular-cli#updating-angular-cli
After updating , my terminal shows angular CLI: 1.5.0 .
Is this the latest ?
@vishal2develop Yes, if youre ever unsure you can check at the release tab: https://github.com/angular/angular-cli/releases