samshull / node-proxy

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

npm install now -g fails on windows #19

Closed jhiraygit closed 12 years ago

jhiraygit commented 12 years ago

verbose about to build C:\node\node_modules\now ERR! error installing now@0.7.6 Error: node-proxy@0.5.2 install: make ERR! error installing now@0.7.6 cmd "/c" "make" failed with 1 ERR! error installing now@0.7.6 at ChildProcess. (C:\node\node_modules\npm\lib\utils\exec.js:49:20) ERR! error installing now@0.7.6 at ChildProcess.emit (events.js:70:17) ERR! error installing now@0.7.6 at maybeExit (child_process.js:359:16) ERR! error installing now@0.7.6 at Process.onexit (child_process.js:395:5) info unbuild C:\node\node_modules\now verbose from cache C:\node\node_modules\now\package.json info preuninstall now@0.7.6 info uninstall now@0.7.6 verbose unbuild now@0.7.6 [ true, 'C:\node\node_modules', 'C:\node\node_modules' ] info postuninstall now@0.7.6 verbose installOne cb now@0.7.6 ERR! node-proxy@0.5.2 install: make ERR! cmd "/c" "make" failed with 1 ERR! ERR! Failed at the node-proxy@0.5.2 install script. ERR! This is most likely a problem with the node-proxy package, ERR! not with npm itself. ERR! Tell the author that this fails on your system: ERR! make ERR! You can get their info via: ERR! npm owner ls node-proxy ERR! There is likely additional logging output above. ERR! ERR! System Windows_NT 5.1.2600 ERR! command "C:\node\node.exe" "C:\node\node_modules\npm\bin\npm-cli.js" "install" "now" "-g" ERR! cwd C:\node ERR! node -v v0.6.1 ERR! npm -v 1.0.105 ERR! code ELIFECYCLE verbose exit [ 1, true ]

samshull commented 12 years ago

You don't appear to have 'make' installed. It is unlikely that node-proxy will build on a windows machine, but let me know if you figure out how to compile a native extension for node on windows. Maybe mingw will work.

Marnix-IxD commented 12 years ago

$ npm install now npm WARN node-proxy@0.5.2 package.json: bugs['web'] should probably be bugs['url']

node-proxy@0.5.2 install /Users/****/node_modules/now/node_modules/node-proxy make

sh: make: command not found npm ERR! error installing node-proxy@0.5.2 Error: node-proxy@0.5.2 install: make npm ERR! error installing node-proxy@0.5.2 sh "-c" "make" failed with 127 npm ERR! error installing node-proxy@0.5.2 at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/exec.js:49:20) npm ERR! error installing node-proxy@0.5.2 at ChildProcess.emit (events.js:67:17) npm ERR! error installing node-proxy@0.5.2 at ChildProcess.onexit (child_process.js:192:12) npm ERR! error installing now@0.7.6 Error: node-proxy@0.5.2 install: make npm ERR! error installing now@0.7.6 sh "-c" "make" failed with 127 npm ERR! error installing now@0.7.6 at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/exec.js:49:20) npm ERR! error installing now@0.7.6 at ChildProcess.emit (events.js:67:17) npm ERR! error installing now@0.7.6 at ChildProcess.onexit (child_process.js:192:12) npm ERR! node-proxy@0.5.2 install: make npm ERR! sh "-c" "make" failed with 127 npm ERR! npm ERR! Failed at the node-proxy@0.5.2 install script. npm ERR! This is most likely a problem with the node-proxy package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! make npm ERR! You can get their info via: npm ERR! npm owner ls node-proxy npm ERR! There is likely additional logging output above. npm ERR! npm ERR! System Darwin 10.8.0 npm ERR! command "node" "/usr/bin/npm" "install" "now" npm ERR! cwd /Users/mvpuijker npm ERR! node -v v0.4.11 npm ERR! npm -v 1.0.106 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /Users/*****/npm-debug.log npm not ok

I got this today while trying to install "Now" on a Macbook Pro, shows a lot of resemblances with the error log up above. So hope it will help.

thomasbielagk commented 12 years ago

I managed to compile on Windows. Just used the generic instructions from here: http://comments.gmane.org/gmane.comp.lang.javascript.nodejs/32599

However there is one problem remaining: As described in http://nodejs.org/docs/v0.6.2/api/addons.html node needs a call

NODE_MODULE(module_name, Initialize)

module_name needs to be a regular C++ variable name so "-" is not allowed. VSCPP doesn't allow for unicode if the unicode char would be in ASCII - so I've got no idea how to make "node-proxy" a variable name... anyone an idea?

Using "node_proxy" instead I could require the module...

ghost commented 12 years ago

node --harmony_proxies --harmony_weakmaps if you're on 0.6.x, no mod required.

jhiraygit commented 12 years ago

Thank you all, will all errors I had and doing searches to resolve them, I installed Ubuntu on Windows. That saved my time.

samshull commented 12 years ago

@Benvie, thanks for the update!

@thomasbielagk, thanks for the links on compiling for windows. I will update this package appropriately when I have the chance, but feel free to submit a pull request with the API changes.

I strongly encourage everyone to use the native proxies that can, this package was never intended to be a permanent alternative to native structures.

zjhiphop commented 12 years ago

How‘s going on? I'm looking forward to it everyday,hehe..

pimvdb commented 12 years ago

Note about the native implementation: Current Node (0.6.6) uses a version of V8 that has certain bugs for proxies, such as proxy[string_in_variable] = 123; not triggering the set trap. It is said it has been fixed, so to be able to properly use --harmony_proxies it's just a matter of time until Node upgrades its V8 version, I guess.

ghost commented 12 years ago

Node master (0.7 soon to be 0.8 stable) uses the 3.8 branch of V8 which has extensive fixes to the various harmony modules and a united --harmony flag. Once 0.8 is the norm this won't be an issue.

vicary commented 12 years ago

Tried using GnuWin32 make, with no luck.

Got the following console output:

> node-proxy@0.5.2 install C:\Program Files\nodejs\node_modules\node-proxy
> make

"BUILDING: C++ Component"
process_begin: CreateProcess(NULL, rm -rf src/build/, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [all] Error 2

I'm new to makefile scripts, where should I start tracing this file not find issue?

SamHasler commented 12 years ago

For anyone coming here from google, this is how you can install nowJS on windows: http://blog.nowjs.com/running-nowjs-natively-on-windows

vicary commented 12 years ago

Don't know if it is a solvable issue, but npm list shows that the bundles version of node-proxy is somewhat out-of-date.

└─┬ now@0.7.6
  └── UNMET DEPENDENCY node-proxy >= 0.4.0

That's why I am trying makefile on Windows.

samshull commented 12 years ago

Windows compatibility is now in the repo https://github.com/samshull/node-proxy/pull/26 thanks to @andreasbotsika