Angular 5 and NPM

Viewed 3704

Is it possible to install Angular 5 dependencies(currently in RC stage) using npm?

This command shows no Angular 5 dependencies:

npm show @angular/core@* version

Or is it possible to download it from repository and install: https://github.com/angular/angular/

Thanks

3 Answers

Disclaimer: Angular 5 has been released (on Nov 1st 2017) and this is the npm command to upgrade to it (windows syntax):

npm install @angular/animations@'^5.0.0' @angular/common@'^5.0.0' @angular/compiler@'^5.0.0' @angular/compiler-cli@'^5.0.0' @angular/core@'^5.0.0' @angular/forms@'^5.0.0' @angular/http@'^5.0.0' @angular/platform-browser@'^5.0.0' @angular/platform-browser-dynamic@'^5.0.0' @angular/platform-server@'^5.0.0' @angular/router@'^5.0.0' typescript@2.4.2 rxjs@'^5.5.2'
npm install typescript@2.4.2 --save-exact

Also, you can read more about the release here: https://blog.angular.io/version-5-0-0-of-angular-now-available-37e414935ced

And you can find out the upgrade guide here: https://angular-update-guide.firebaseapp.com

Follow the following instruction:

npm uninstall -g angular-cli

then

npm uninstall --save-dev angular-cli

and

npm uninstall -g @angular/cli

Clean up the cache

( npm cache clean -f ) or ( npm cache verify )

Install angular globally

npm install -g @angular/cli@latest
local project setup if you have one
rm -rf node_modules

npm install --save-dev @angular/cli@latest

and finally,

npm install

Hope this helps!

Try to Run npm update command. This will automatically update all the required dependencies and files. After running the command you can check the version by running ng -version

Related