command line - How can i install npm in ubuntu to run less js -
i have installed node js in ubuntu 14.04, not able install npm
in it. want compile less
through command line need npm
.
is there way compile less
or how can install npm
in ubuntu?
first things first, run sudo apt-get update
.
npm should installed along node.js. it's possible have name collision issue; ubuntu repository carries program called 'node' (a program ham radio operators) unrelated node.js. further, many node modules assume 'node' refers node.js.
try removing node:
sudo apt-get remove node
use which nodejs
see command node.js lives. create symlink somewhere in path node
points nodejs
, e.g.
sudo ln -s [path/to/nodejs/here] /usr/bin/node
after that, /usr/bin
should in system's path variable, should able use node.js typing 'node'. e.g. try node --version
. should match nodejs --version
.
if none of works, can try removing nodejs , node, install nodejs-legacy, supposed use command 'node' default. consider installing node.js source. can find binary , source downloads @ nodejs.org, or can latest version github (joyent/node).
Comments
Post a Comment