Setup:
I have NodeJS installed on my system (C) drive on a Windows 8 x64 machine. I have QUnit installed globally via npm
:
npm install qunit -g
The problem:
If I attempt to reference QUnit with:
var q = require('qunit');
while running NodeJS from any directory on the C drive, everything works as expected. However, when I run it from my projects directory which resides on my secondary E drive, Node cannot find my globally installed package:
Error: Cannot find module 'qunit'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at repl:1:9
at REPLServer.self.eval (repl.js:109:21)
at rli.on.self.bufferedCmd (repl.js:258:20)
at REPLServer.self.eval (repl.js:116:5)
at Interface.<anonymous> (repl.js:248:12)
at Interface.EventEmitter.emit (events.js:96:17)
Is there some other configuration I'm missing to be able to use globally installed packages while running NodeJS from my secondary drive? Is this just unsupported? I'd like to not have to locally install them and check them into source control, but it is a backup option if global packages do not work from secondary drives.