Note that there are some explanatory texts on larger screens.

plurals
  1. POGlobal Node modules not installing correctly. Command not found
    primarykey
    data
    text
    <p>I am having a problem installing global node modules and everything I find online says the solve is just adding -g. Which is not the problem. I believe it's a linking issue or wrong directory issue. </p> <p>Here is what I do:</p> <pre><code>$ npm install -g express npm http GET https://registry.npmjs.org/express npm http 304 https://registry.npmjs.org/express npm http GET https://registry.npmjs.org/range-parser/0.0.4 npm http GET https://registry.npmjs.org/mkdirp/0.3.3 ...downloads correctly $ express myapp bash: express: command not found </code></pre> <p>However when I run the direct link location to express it works:</p> <pre><code> $ /usr/local/share/npm/bin/express myapp create : myapp create : myapp/package.json create : myapp/app.js ... Builds app correctly </code></pre> <p>Where the module is: </p> <pre><code>$ which node /usr/local/bin/node $ node -pe process.execPath /usr/local/Cellar/node/0.8.20/bin/node $ npm link express /Users/bentonrr/Development/Personal/node_modules/express -&gt; /usr/local/share/npm/lib/node_modules/express </code></pre> <p>In my .bash_profile I have:</p> <pre><code>export PATH=/usr/local/bin:$PATH export NODE_PATH=/usr/local/lib/node_modules:/usr/local/lib/node </code></pre> <p>Do I need to change my Node environment to download to correct folder? Is something not linking correctly? I am lost.. </p> <p>Thanks!</p> <p>Other Specs:</p> <pre><code>$ node --version v0.8.20 $ npm --version 1.2.11 $ brew --version 0.9.4 OSX Version 10.8.2 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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