Windows - Can't build node modules with spaces on the path
See original GitHub issueI trying to compile https://www.npmjs.com/package/net-ping on my nw.js application, but my user folder on Windows have a space, this cause this error:
C:\nwjs\My New App\node_modules\net-ping>nw-gyp rebuild --target=0.28.2 gyp info it worked if it ends with ok gyp info using nw-gyp@3.6.3 gyp info using node@8.9.0 | win32 | x64 gyp http GET http://node-webkit.s3.amazonaws.com/v0.28.2/nw-headers-v0.28.2.tar.gz gyp http 200 http://node-webkit.s3.amazonaws.com/v0.28.2/nw-headers-v0.28.2.tar.gz gyp http GET http://node-webkit.s3.amazonaws.com/v0.28.2/x64/nw.lib gyp http GET http://node-webkit.s3.amazonaws.com/v0.28.2/nw.lib gyp http GET http://node-webkit.s3.amazonaws.com/v0.28.2/x64/node.lib gyp http GET http://node-webkit.s3.amazonaws.com/v0.28.2/node.lib gyp http 200 http://node-webkit.s3.amazonaws.com/v0.28.2/x64/node.lib gyp http 200 http://node-webkit.s3.amazonaws.com/v0.28.2/x64/nw.lib gyp http 200 http://node-webkit.s3.amazonaws.com/v0.28.2/node.lib gyp http 200 http://node-webkit.s3.amazonaws.com/v0.28.2/nw.lib gyp info spawn C:\Python27\python.exe gyp info spawn args [ ‘C:\Users\Mitsuha Kitsune\AppData\Roaming\npm\node_modules\nw-gyp\gyp\gyp_main.py’, gyp info spawn args ‘binding.gyp’, gyp info spawn args ‘-f’, gyp info spawn args ‘msvs’, gyp info spawn args ‘-G’, gyp info spawn args ‘msvs_version=2015’, gyp info spawn args ‘-I’, gyp info spawn args ‘C:\nwjs\My New App\node_modules\net-ping\build\config.gypi’, gyp info spawn args ‘-I’, gyp info spawn args ‘C:\Users\Mitsuha Kitsune\AppData\Roaming\npm\node_modules\nw-gyp\addon.gypi’, gyp info spawn args ‘-I’, gyp info spawn args ‘C:\Users\Mitsuha Kitsune\.nw-gyp\0.28.2\common.gypi’, gyp info spawn args ‘-Dlibrary=shared_library’, gyp info spawn args ‘-Dvisibility=default’, gyp info spawn args ‘-Dnode_root_dir=C:\Users\Mitsuha Kitsune\.nw-gyp\0.28.2’, gyp info spawn args ‘-Dnode_gyp_dir=C:\Users\Mitsuha Kitsune\AppData\Roaming\npm\node_modules\nw-gyp’, gyp info spawn args ‘-Dnode_lib_file=“C:\Users\Mitsuha Kitsune\.nw-gyp\0.28.2\<(target_arch)\node.lib”’, gyp info spawn args ‘-Dnw_lib_file=“C:\Users\Mitsuha Kitsune\.nw-gyp\0.28.2\<(target_arch)\nw.lib”’, gyp info spawn args ‘-Dmodule_root_dir=C:\nwjs\My New App\node_modules\net-ping’, gyp info spawn args ‘-Dnode_engine=v8’, gyp info spawn args ‘–depth=.’, gyp info spawn args ‘–no-parallel’, gyp info spawn args ‘-Dv13=1’, gyp info spawn args ‘–generator-output’, gyp info spawn args ‘C:\nwjs\My New App\node_modules\net-ping\build’, gyp info spawn argsC:\Python27\python.exe: can’t open file ‘C:\Users\Mitsuha’: [Errno 2] No such file or directory ‘-Goutput_dir=.’ ] gyp ERR! configure error gyp ERR! stack Error:
gyp
failed with exit code: 2 gyp ERR! stack at ChildProcess.onCpExit (C:\Users\Mitsuha Kitsune\AppData\Roaming\npm\node_modules\nw-gyp\lib\configure.js:359:16) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Windows_NT 10.0.16299 gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\Mitsuha Kitsune\AppData\Roaming\npm\node_modules\nw-gyp\bin\nw-gyp.js” “rebuild” “–target=0.28.2” gyp ERR! cwd C:\nwjs\My New App\node_modules\net-ping gyp ERR! node -v v8.9.0 gyp ERR! nw-gyp -v v3.6.3 gyp ERR! not ok
Appear only error of nw-gyp, the oficial node-gyp don’t have this issue but when I try to load the module compiled with node-gyp the console shows a Uncaught Error: Error in a dynamic link library initialization routine (DLL)
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top GitHub Comments
3.6.2 version works fine
Thanks @shellka
Rolling back to nw-gyp v3.6.2 worked for me