NPM won't install angular2
I'm trying to get started with Angular 2 and for some reason npm won't load it. I ran the npm update command several times, so this is not an issue with npm.
I keep getting the following error:
error notarget No compatible version found: angular2@'*'
36 error notarget Valid install targets:
36 error notarget ["2.0.0-alpha.8.dev","2.0.0-alpha.8.prod","2.0.0-alpha.11","2.0.0-alpha.12","2.0.0-alpha.13","2.0.0-alpha.14","2.0.0-alpha.15","2.0.0-alpha.16","2.0.0-alpha.17","2.0.0-alpha.18","2.0.0-alpha.19","2.0.0-alpha.20","2.0.0-alpha.21","2.0.0-alpha.22","2.0.0-alpha.23","2.0.0-alpha.24","2.0.0-alpha.25","2.0.0-alpha.26","2.0.0-alpha.27","2.0.0-alpha.28","2.0.0-alpha.29","2.0.0-alpha.30","2.0.0-alpha.31","2.0.0-alpha.32"]
36 error notarget
It's such a funny road block trying to learn how to wireframe.
Does anyone know how to fix this or is there a download source that actually works? I just want to start with Angular2 = (
source to share
Use the following line as requested:
npm install angular2@2.0.0-alpha.32
Note that the error message gave the key. As shown below, the error message tried to tell you what is really after angular2@
. 2.0.0-alpha.32
is currently the latest version.
Valid install targets:
["2.0.0-alpha.8.dev","2.0.0-alpha.8.prod","2.0.0-alpha.11","2.0.0-alpha.12","2.0.0-alpha.13","2.0.0-alpha.14","2.0.0-alpha.15","2.0.0-alpha.16","2.0.0-alpha.17","2.0.0-alpha.18","2.0.0-alpha.19","2.0.0-alpha.20","2.0.0-alpha.21","2.0.0-alpha.22","2.0.0-alpha.23","2.0.0-alpha.24","2.0.0-alpha.25","2.0.0-alpha.26","2.0.0-alpha.27","2.0.0-alpha.28","2.0.0-alpha.29","2.0.0-alpha.30","2.0.0-alpha.31","2.0.0-alpha.32"]
source to share
Try this:
npm install angular2 -g
This worked for me and installed angularJS2 alpha32. You can add the --save flag to preserve the module name in the existing .json package, if needed.
EDIT: the -g attribute will set angular2 globally, removing the -g will set it locally, which should be preferred!
Later, if possible, I would prefer to install angular2 in a different way, that is, with Bower:
bower install angular2
source to share