Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't run globally installed node module
    text
    copied!<p>I'm new to node.js, and still in the process to setup its environment. </p> <p>I installed node.js v0.8.14 and npm v1.1.65. I tried to install several modules to the project I'm working on. They worked fine.</p> <p>Then, I installed some global modules, like node-dev and node-inspector. There is no error as far as I can see. I got result like:</p> <pre><code>/usr/local/share/npm/bin/node-dev -&gt; /usr/local/share/npm/lib/node_modules/node-dev/bin/node-dev node-dev@2.0.2 /usr/local/share/npm/lib/node_modules/node-dev ├── growl@1.7.0 ├── dateformat@1.0.6-1.2.3 └── chokidar@0.6.2 </code></pre> <p>However, when I try to use it. It just said: </p> <pre><code>-bash: node-dev: command not found </code></pre> <p>I reinstalled it. Nothing changed. I added <code>/usr/local/share/npm/bin/</code> to .bashrc based on some answers on similar problems. It still doesn't work.</p> <p>Finally, I even tried to navigate to <code>/usr/local/share/npm/bin/</code> and call <code>node-dev</code> directly. Same error. Though, if I double click node-dev file in Finder. It will show some results:</p> <pre><code>localhost:~ Xiao$ /usr/local/share/npm/lib/node_modules/node-dev/bin/node-dev ; exit; Usage: node-dev [options] script [arguments] </code></pre> <p>I'm totally baffle. Does anyone have some idea about what's going on here?</p> <p>Btw, I'm using Mac OSX 10.8.4.</p> <p>EDIT: I found out that these globally installed scripts will work if I use full path. For example, <code>/usr/local/share/npm/bin/node-dev</code> works, but <code>node-dev</code> doesn't. Even I try to executed it under <code>/usr/local/share/npm/bin</code></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload