samshull / node-proxy

Deprecated: Harmony Proxies in node (no longer needed)
MIT License
162 stars 29 forks source link

http://registry.npmjs.org/node-proxy/latest (version 0.5.2) missing node-proxy.node #16

Closed jfly closed 13 years ago

jfly commented 13 years ago

I'm not sure if this is the right place to point this out, but the latest version of node-proxy on npmjs.org (http://registry.npmjs.org/node-proxy/-/node-proxy-0.5.2.tgz) has an empty "lib" directory. I'm pretty sure there is supposed to be a node-proxy.node file in there. Older versions on npm do have this file (see http://registry.npmjs.org/node-proxy/-/node-proxy-0.4.0.tgz)

samshull commented 13 years ago

The lib folder is empty on purpose, node-proxy is a native extension for node.js, when you compile using make node-proxy.node will be placed in the lib folder. This structure is for making a simple structure for use in npm.

jfly commented 13 years ago

Oh, ok. Do you know anything about getting node-proxy to run on the Windows version of node?

samshull commented 13 years ago

I know that node-proxy works fine if you compile both node and node-proxy in the cygwin environment. But the windows version of node runs in a different way. You should try compiling node-proxy in a cygwin environment (compile node first), then you can attempt to use the compiled node-proxy with your windows version of node. I don't know if this will work or not, but it sounds like a viable option. Let us know if it works or not.

jfly commented 12 years ago

Sorry for the long delay here. I finally got around to compiling node (v 0.5.9) and node-proxy on cygwin. The node-proxy.node generated by cygwin works great with the cygwin compile of node, but not with the native windows build.

This traceback probably isn't terribly helpful, but here it is.

[Error: Unable to load shared library c:\cygwin\home\node_modules\node-proxy.node] Error: Unable to load shared library c:\cygwin\home\node_modules\node-proxy.node at Object..node (module.js:463:11) at Module.load (module.js:351:31) at Function._load (module.js:310:12) at Module.require (module.js:357:17) at require (module.js:368:17) at Object.<anonymous> (c:\cygwin\home\Jeremy\Hackathon2011\node_modules\now\lib\proxy.js:10: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)

samshull commented 12 years ago

Try upgrading to 0.6.2 and using the --harmony_proxies flag, that will eliminate the need for the node-proxy package.

jfly commented 12 years ago

I had to remove the call to require('node-proxy') in my code, but it now works like a charm, thank you!

Sorry if this isn't the place for the discussion, but is there any reason why the --harmony_proxies flag isn't enabled by default?

ericz commented 12 years ago

Note using --harmony_proxies is not a drop in replacement yet due to http://code.google.com/p/v8/issues/detail?id=1543#c10