I wanted to install a node module globally so that I could access it from anywhere. I ran the below command, apparently successfully ...
localhost:workspace satishp$ npm install -g git+https://github.com/ryohey/node-stratum-client.git
+ node-stratum-client@0.0.1
updated 1 package in 1.022s
and then I have a "run.js" file in which this is the first line
require("node-stratum-client")
However when I go to run my file ,it complains about not finding the module I just installed globally . Is there something else I need to do to get the module to install globally?
localhost:workspace satishp$ node run.js
module.js:557
throw err;
^
Error: Cannot find module 'node-stratum-client'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/satishp/Documents/workspace/run.js:1:63)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)