marstall/shim

Node.js error when trying to start shim.js

Closed this issue · 2 comments

Hi there!

After following the "INSTALLING SHIM", I got the following error when I tried to execute node shim.js

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: Cannot find module 'http-proxy'
    at Function._resolveFilename (module.js:334:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:357:17)
    at require (module.js:368:17)
    at Object.<anonymous> (/Users/thomasklein/webapps/shim/shim.js:2:13)
    at Module._compile (module.js:432:26)
    at Object..js (module.js:450:10)
    at Module.load (module.js:351:31)
    at Function._load (module.js:310:12)
    at Array.0 (module.js:470:10)

Maybe this is an issue of my network privileges. After running sudo ./configure_proxy.sh I got the following output:

setting network interface privileges ...
Adding firewall rule to forward all port-80 WiFi passthrough traffic to localhost:3128 ...
net.inet.ip.forwarding: 1 -> 1
net.inet.ip.fw.enable: 1 -> 1
net.inet.ip.fw.verbose: 1 -> 1
sysctl: oid 'net.inet.ip.scopedroute' is read only

Do you see any possible misconfiguration?

I've got "node 0.6.7" and "npm 1.1.0-beta-10" installed along with current version of shim.

UPDATE: And of course I've got the module 'http-proxy' (v @0.8.0) installed.

Best,
Thomas

After installing the module 'http-proxy' locally (before, I installed it with the global option of NPM) it worked!

Thanks thomas - great to hear it worked! it looks like i need to add a note about http-proxy and the other modules to my help file ...