nodists / nodist

Natural node.js and npm version manager for windows.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Global modules do not show up for scripts

grapevine2383 opened this issue · comments

Global modules do not get required when executing a script through node. Process as follows:

nodist #Shows specified version
npm install -g archiver
node script.js #script.js has the contents "var a=require('archiver');" and fails with Error: Cannot find module 'archiver'

`

Even though I uninstalled nodejs it still kept the NODE_PATH env variable. I deleted that and reinstalled nodist and it works now.

Ah, phew. Would've been alarming otherwise... Cheers!