nodejs / node-chakracore

Node.js on ChakraCore :sparkles::turtle::rocket::sparkles:
Other
1.92k stars 342 forks source link

node-gyp errors installing `npm i sleep` with npm@6.4.1 and nvs@1.5.1 #609

Closed jdalton closed 5 years ago

jdalton commented 5 years ago

node-gyp errors installing npm i sleep with npm@6.4.1 and nvs@1.5.1 for node-chakra 10.6.0 and 10.13.0 with:

C:\projects\esm\node_modules\sleep>if not defined npm_config_node_gyp (node "C:\Users\jdalton\AppData\Local\nvs\chakracore\10.13.0\x64\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\jdalton\AppData\Local\nvs\chakracore\10.13.0\x64\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack    at failNoPython (C:\Users\jdalton\AppData\Local\nvs\chakracore\10.13.0\x64\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:5)

This does not happen when switching to the v8 powered Node versions with nvs.

Update:

On further investigation it started happening on v8 powered Node as well. Setting the environment variable resolved the issue.