Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 5 and NPM

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

like image 336
Sergiy Avatar asked Sep 29 '17 10:09

Sergiy


2 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' [email protected] rxjs@'^5.5.2'
npm install [email protected] --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

like image 187
Wagner Danda da Silva Filho Avatar answered Oct 06 '22 18:10

Wagner Danda da Silva Filho


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!

like image 33
Enayat Avatar answered Oct 06 '22 18:10

Enayat