Question

I've downloaded Bootstrap 3.1.1 source files from the official website and I am getting errors when attempting to run npm install in the bootstrap/ directory when following the bootstrap setup directions from the site.

I'm on a Ubuntu 14.04 platform with npm 1.3.10 installed from distribution repositories, and could successfully run npm install -g grunt-cli without a problem.

When I try to sudo npm install from the bootstrap directory, however, I see a long string of successful GET messages, which then terminate with this error:

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

I've consulted the README.Debian mentioned in the warning, which only seems to say that Debian platforms need to call nodejs instead of node to avoid namespace collisions. I'm unsure how to verify if that is a problem.

I found the error message, weird error 1 to be not particularly helpful either.

How do install this project cleanly without errors?

Was it helpful?

Solution

Run these commands

sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install python-software-properties python g++ make nodejs

to install node.js from repository.

OTHER TIPS

install nodejs-legacy, this fix the error

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top