TooTallNate / ref

Turn Buffer instances into "pointers"
http://tootallnate.github.com/ref
453 stars 141 forks source link

node-gyp fails for this module #84

Closed Pomax closed 6 years ago

Pomax commented 7 years ago

I'm getting the following error when node-gyp tries to compile this on Windows:

> ref@1.3.4 install c:\Users\Pomax\Documents\git\temp\pluginboutique\node_modules\ref
> node-gyp rebuild

c:\Users\Pomax\Documents\git\temp\pluginboutique\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Program Files\Python35\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd c:\Users\Mike\Documents\git\temp\pluginboutique\node_modules\ref
gyp ERR! node -v v8.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

Which is curious, as there is zero reason to be looking for python in the indicated "C:\Program Files\Python35\python.EXE" given that Python installs itself with a PATH binding. Calling "python" just... works.

Not sure if this is ref or node-gyp doing the wrong thing.

TooTallNate commented 6 years ago

This would be a node-gyp bug/issue. Please file an issue here: https://github.com/nodejs/node-gyp/issues

Pomax commented 6 years ago

Sort of - the other side of the coin is that it would be super useful if pre-gyp binaries could be added so that no recompiling is necessary on a current version of (at least) OSX or Windows.