我已经从 official website 下载了 Bootstrap 3.1.1 源文件当我按照 bootstrap setup directions 尝试在 bootstrap/
目录中运行 npm install
时,出现错误从网站。
我使用的是 Ubuntu 14.04 平台,从分发存储库安装了 npm 1.3.10
,并且可以成功运行 npm install -g grunt-cli
,没有任何问题。
但是,当我尝试从引导目录中 sudo npm install
时,我看到一长串成功的 GET 消息,然后该消息终止并出现以下错误:
npm http 304 https://registry.npmjs.org/proto-list
> phantomjs@1.9.7-4 install /home/cboettig/Documents/code/thirdparty/bootstrap/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs
> node install.js
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! weird error 1
npm ERR! not ok code 0
我查阅了警告中提到的README.Debian
,它似乎只是说Debian平台需要调用nodejs
而不是node
以避免命名空间冲突。我不确定如何验证这是否有问题。
我发现错误消息奇怪的错误1
也不是特别有帮助。
如何干净地安装这个项目而不出现错误?
最佳答案
运行这些命令
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install python-software-properties python g++ make nodejs
从存储库安装node.js。
关于node.js - 无法安装 twitter bootstrap node.js 依赖项(在 Ubuntu 上),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23251351/