使用npm install angular2 –save时出错

我正在关注Angular 2上的Tuts +教程。在这个video中: https : //code.tutsplus.com/courses/whats-new-in-angular-2/lessons/angular-2-and-es5作者说input以下命令:

npm install angular2 --save

我试过了,以及在它前面使用sudo ,但得到以下错误:

 npm WARN package.json angular2tuts@1.0.0 No description npm WARN package.json angular2tuts@1.0.0 No repository field. npm WARN package.json angular2tuts@1.0.0 No README data npm ERR! Darwin 15.0.0 npm ERR! argv "node" "/usr/local/bin/npm" "install" "angular2" "--save" npm ERR! node v0.12.7 npm ERR! npm v2.11.3 npm ERR! code ETARGET npm ERR! notarget No compatible version found: angular2@'*' npm ERR! notarget Valid install targets: npm ERR! 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","2.0.0-alpha.33","2.0.0-alpha.34","2.0.0-alpha.35","2.0.0-alpha.36","2.0.0-alpha.37","2.0.0-alpha.38","2.0.0-alpha.39","2.0.0-alpha.40","2.0.0-alpha.41","2.0.0-alpha.42","2.0.0-alpha.44","2.0.0-alpha.45","2.0.0-alpha.46","2.0.0-alpha.47","2.0.0-alpha.48","2.0.0-alpha.49","2.0.0-alpha.50","2.0.0-alpha.51","2.0.0-alpha.52","2.0.0-alpha.53","2.0.0-alpha.54","2.0.0-alpha.55","2.0.0-beta.0","2.0.0-beta.1"] npm ERR! notarget npm ERR! notarget This is most likely not a problem with npm itself. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. 

在这里输入图像说明

想法?

作者能够没有错误地做到这一点:

在这里输入图像说明

       

网上收集的解决方案 "使用npm install angular2 –save时出错"

要使用npm安装angular2,您可以指定版本或使用@latest

  • 指定一个版本
 npm install angular2@2.0.0-beta.1 --save 
  • 使用latest (这将显然安装在npm提供的最新版本)
 npm install angular2@latest --save 

还要注意的是,有计划支持angular@next来增加安装夜间构build的可能性,但是它还不被支持(到目前为止,快照是不时发布的,但命令还没有提供)。 检查问题#4671了解更多信息。