0

echo $NODE_PATH

returns

/Users/swills/.npm-packages/lib/node_modules::/Users/swills/npm/lib/node_modules

Running npm install -g express-generator installs express-generator in both:

/Users/swills/.npm-packages/lib/node_modules

and

/Users/swills/npm/lib/node_modules

Might this cause future dependency issues? If so, how can I fix this?

I've installed node several times for updates, and once or twice to avoid having to use sudo. I think that might have something to do with it. I vaguely remember using either the first (node-and-npm-in-30-seconds.sh) or second (only-git-all-the-way.sh) option from this github gist: https://gist.github.com/isaacs/579814

Swills
  • 153
  • 2
  • 16

1 Answers1

0

First are you sure that not both are needed in the environment variable? i.e does these two paths contain the exact same files? Second if they are infact the same, use the "which" command to know which is the default one. For example if you have two different jdks installed, upon calling "which java" will return the path to the default one first.

mkmostafa
  • 3,071
  • 2
  • 18
  • 47
  • Not completely sure that not both are needed. Adion from this link: [link](http://bit.ly/1KoIWfc) used echo $NODE_PATH which resulted in: /Users/andredion/local/node:/Users/andredion/local/node/lib/node_modules However, the end directories for each are node and node_modules. Mine has node_modules twice (which is where my confusion lies). Also, the files contained in the node_modules directory for each path is different. The only file that is the same is express-generator, which is probably because I installed that after I tried the configuring node... which may have caused this problem... – Swills Sep 15 '15 at 23:03
  • If the files are different then both must be needed. Try a clean installation. After that invoke "which" to make sure where the default path lies. – mkmostafa Sep 15 '15 at 23:20