Upgrade angular-cli: 1.0.0-beta.28.3 to @ angular/cli: 1.0.0,
Now Angular CLI replaces angular-cli with @ angular/cli in npm, and it only supports Node6.9.0 or a later version, npm 3 or a later version. Therefore, upgrade node and npm before upgrading angular cli.
If you use Angular CLI beta.28 or a lower version, you need to uninstall the angular-cli package first:
Npm uninstall-g angular-clinpm uninstall -- save-dev angular-cli
If you forget to update npm, When you execute the first line of command above, you will be prompted to update the npm to the latest version, and then execute the above two lines of command.
Update Angular CLI to the new version. You must update the global package and local package of your project.
Global package:
Npm uninstall-g @ angular/clinpm cache cleannpm install-g @ angular/cli @ latest (npm usually causes installation failure. You can use cnpm)
Packages for local projects:
Rm-rf node_modules dist # use rmdir on Windows (delete node_modules and dist Directories) npm install -- save-dev @ angular/cli @ latest (npm often causes installation failure, you can use cnpm) npm install
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.