Help in launching npm packages.

57 views
Skip to first unread message

Darshan Chaudhary

unread,
Sep 3, 2014, 3:41:18 PM9/3/14
to nod...@googlegroups.com
I have Ubuntu 14.04 and am facing problems using Node.js packages.

npm -v shows 1.3.10
nodejs -v shows v0.10.25

i installed learnyounode using sudo npm install leanyounode
after it completed the installation, when i type in learnyounode, i get no response. There is no error, nothing.


Ryan Schmidt

unread,
Sep 4, 2014, 1:50:33 AM9/4/14
to nod...@googlegroups.com
"no response, no error, nothing" usually means that a program successfully ran.

I find that unusual in this case, since I would not expect there to be a program installed on your system called "learnyounode". Usually your $PATH environment variable would be set to run programs from system locations, and invoking "npm install" does not install anything in system locations, unless you use the "-g" flag, which you didn't do; the learnyounode documentation says you should use the "-g" flag to install it globally; then running just "learnyounode" should work.

When you don't use the "-g" flag, "npm install" installs files in the node_modules folder in the same directory (or an ancestor directory, if such a directory already exists there). The ".bin" subfolder of the node_modules folder typically contains any programs you're meant to run. You could check if a "learnyounode" program has been installed there for you, and if so you could run that instead of installing the module globally.

Reply all
Reply to author
Forward
0 new messages