Fluidbyte
Fluidbyte

Reputation: 5210

NPM packages not available after Node Upgrade

I recently upgraded NodeJS from 0.8.X to 0.10.X and now I'm unable to access npm packages I previously had installed. For instance I use jshint frequently and

jshint /path/to/file.js

just sends back command not found. I'm using NVM, so if I switch back via nvm use 0.8.X I can then use the modules again.

Assuming I need to re-register the npm's or something, but I'm just curious if there's something more straight-forward I'm missing.

Upvotes: 0

Views: 90

Answers (1)

Noah
Noah

Reputation: 34313

You need to reinstall global packages after upgrading with nvm. There is a separate global node_modules folder for each version of node that you install with nvm

Example

0.8 jshint ~/.nvm/v0.8.23/lib/node_modules/jshint

0.10 jshint ~/.nvm/v0.10.4/lib/node_modules/jshint

Upvotes: 1

Related Questions