【发布时间】:2016-06-26 13:28:23
【问题描述】:
我在使用 npm 安装 angularjs 版本 1.5.7 时遇到了困难。我已经准备好我的 package.json 文件如下。
{
"name": "angular",
"version": "1.5.7"
}
当我在我的项目所在的终端中输入以下命令时:
sudo npm install angular@1.5.7 --save
我遇到以下错误消息:
npm ERR! Linux 4.4.0-24-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "angular@1.5.7" "--save"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! code ENOSELF
npm ERR! Refusing to install angular as a dependency of itself
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/nato/angular/npm-debug.log
这是我第一次通过 npm 安装 angularjs,所以我不知道我到底做错了什么。
【问题讨论】:
标签: angularjs node.js npm ubuntu-16.04