Angular 2快速入门安装失败,通过npm(链接 - https://angular.io/docs/js/latest/quickstart.html)

时间:2016-07-26 19:24:12

标签: angularjs ubuntu angular npm npm-install

如链接中所示,我一直试图让我的Ubuntu 15.10计算机上运行Angular 2但是我收到以下错误消息并且安装失败。

我还尝试通过npm package命令安装Angular 2,即sudo npm install angular2@2.0.0-alpha.32,但这会产生同样的错误。

任何帮助将不胜感激。谢谢。

以下是错误。它底部提到的日志不能在这里发布,因为它超过1000行。

sudo npm install
npm WARN package.json angular2-quickstart@1.0.0 No description
npm WARN package.json angular2-quickstart@1.0.0 No repository field.
npm WARN package.json angular2-quickstart@1.0.0 No README data
npm ERR! 404 Not Found
npm ERR! 404 
npm ERR! 404 'angular/common' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'angular2-quickstart'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Linux 4.2.0-16-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/anshuman/angular2-quickstart
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code E404
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/anshuman/angular2-quickstart/npm-debug.log
npm ERR! not ok code 0

2 个答案:

答案 0 :(得分:0)

您必须更新您的节点和最新版本的npm。

node -v
v4.4.7

npm  -v
3.10.5

答案 1 :(得分:0)

还尝试清除你的npm缓存

npm cache clear