Repository navigation
https://iojs.org/api/addons.html hello world doesn't work on windows #1526
Description
Activity
- addedwindowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
on Apr 26, 2015 Does this new issue mean that #1525 is no longer valid?
Also, are you using the
iojsor thenodebinary in your command line to execute the script?It appears to work if I invoke it with
iojsbut not when I invoke it withnodeI don't think they'll be compatible with each other, as they were probably compiled against different versions of v8. Recompiling for each respective binary should work though.
I thought
nodeis just an alias ofiojs:Kolodny@HOME-DESKTOP ~ $ which iojs /c/Program Files/iojs/iojs Kolodny@HOME-DESKTOP ~ $ which node /c/Program Files/iojs/node Kolodny@HOME-DESKTOP ~ $ node --version v1.8.1 Kolodny@HOME-DESKTOP ~ $ iojs --version v1.8.1' Kolodny@HOME-DESKTOP ~ $ ls -l /c/Program\ Files/iojs/ total 8624 -rwxr-xr-x 2 Kolodny Administ 8821864 Apr 21 00:35 iojs.exe -rwxr-xr-x 2 Kolodny Administ 8821864 Apr 21 00:35 node.exe
This is an issue specific to Windows. I believe there will be a fix for this in io.js 2.0.0 that will work for the majority of addons. See #1433 for more details.
- changed the title
[-]https://iojs.org/api/addons.html hello world doesn't work on windws[/-][+]https://iojs.org/api/addons.html hello world doesn't work on windows[/+]on Apr 27, 2015 Does this work now that #1433 has been merged?
Don't know, I'm getting a 404 on the tarball now:
$ node --version v2.0.0-nightly20150427547213913b $ npm install npm WARN package.json node-addon-test@1.0.0 No repository field. npm WARN package.json 2@0.0.1 No repository field. > node-addon-test@1.0.0 install c:\Users\Kolodny\Documents\RandomProjects\node-addon-test > node-gyp rebuild c:\Users\Kolodny\Documents\RandomProjects\node-addon-test>if not defined npm_config_node_gyp (node "c:\Program Files\iojs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (rebuild) gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: 404 status code downloading tarball gyp ERR! stack at Request.<anonymous> (c:\Program Files\iojs\node_modules\npm\node_modules\node-gyp\lib\install.js:246:14) gyp ERR! stack at emitOne (events.js:82:20) gyp ERR! stack at Request.emit (events.js:166:7) gyp ERR! stack at Request.onRequestResponse (c:\Program Files\iojs\node_modules\npm\node_modules\request\request.js:1156:10) gyp ERR! stack at emitOne (events.js:77:13) gyp ERR! stack at ClientRequest.emit (events.js:166:7) gyp ERR! stack at HTTPParser.parserOnIncomingClient (_http_client.js:414:21) gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23) gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:304:20) gyp ERR! stack at emitOne (events.js:77:13) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "c:\\Program Files\\iojs\\node.exe" "c:\\Program Files\\iojs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd c:\Users\Kolodny\Documents\RandomProjects\node-addon-test gyp ERR! node -v v2.0.0-nightly20150427547213913b gyp ERR! node-gyp -v v1.0.3 gyp ERR! not ok npm ERR! Windows_NT 6.1.7601 npm ERR! argv "c:\\Program Files\\iojs\\node.exe" "c:\\Program Files\\iojs\\node_modules\\npm\\bin\\npm-cli.js" "install" npm ERR! node v2.0.0-nightly20150427547213913b npm ERR! npm v2.8.3 npm ERR! code ELIFECYCLE npm ERR! node-addon-test@1.0.0 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-addon-test@1.0.0 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the node-addon-test package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls node-addon-test npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! c:\Users\Kolodny\Documents\RandomProjects\node-addon-test\npm-debug.log
Why don't you just set 'win_delay_load_hook': 'true' in binding.gyp and call it a day?
@kkoopa that doesn't work with either:
npm WARN package.json node-addon-test@1.0.0 No repository field. npm WARN package.json 2@0.0.1 No repository field. > node-addon-test@1.0.0 install c:\Users\Kolodny\Documents\RandomProjects\node-addon-test > node-gyp rebuild c:\Users\Kolodny\Documents\RandomProjects\node-addon-test>if not defined npm_config_node_gyp (node "c:\Program Files\iojs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (rebuild) Traceback (most recent call last): File "c:\Program Files\iojs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 18, in <module> sys.exit(gyp.script_main()) File "c:\Program Files\iojs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 534, in script_main return main(sys.argv[1:]) File "c:\Program Files\iojs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 527, in main return gyp_main(args) File "c:\Program Files\iojs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 503, in gyp_main options.circular_check) File "c:\Program Files\iojs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 129, in Load params['parallel'], params['root_targets']) File "c:\Program Files\iojs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 2692, in Load variables, includes, depth, check, True) File "c:\Program Files\iojs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 362, in LoadTargetBuildFile includes, True, check) File "c:\Program Files\iojs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 219, in LoadOneBuildFile None) File "<string>", line 8, in <module> NameError: name 'true' is not defined while reading binding.gyp while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (c:\Program Files\iojs\node_modules\npm\node_modules\node-gyp\lib\configure.js:343:16) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:169:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1009:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "c:\\Program Files\\iojs\\node.exe" "c:\\Program Files\\iojs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd c:\Users\Kolodny\Documents\RandomProjects\node-addon-test gyp ERR! node -v v1.8.1 gyp ERR! node-gyp -v v1.0.3 gyp ERR! not ok npm ERR! Windows_NT 6.1.7601 npm ERR! argv "c:\\Program Files\\iojs\\node.exe" "c:\\Program Files\\iojs\\node_modules\\npm\\bin\\npm-cli.js" "install" npm ERR! node v1.8.1 npm ERR! npm v2.8.3 npm ERR! code ELIFECYCLE npm ERR! node-addon-test@1.0.0 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-addon-test@1.0.0 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the node-addon-test package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls node-addon-test npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! c:\Users\Kolodny\Documents\RandomProjects\node-addon-test\npm-debug.log
Strange. Did you put it in the right location in binding.gyp?
{ 'targets': [ { 'target_name': 'foo', 'win_delay_load_hook': 'true', ...I originally put it as a sibling to targets, it works now as a prop inside it
@kolodny is this issue fixed?
@brendanashworth Yup, fixed, thanks :)
I tried following the simple example at https://iojs.org/api/addons.html
You can see the code and error at this example repo I've also attached the error I'm getting below:
I'm using v1.8.1