Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install fails #1

Closed
jonathan-benn opened this issue Jul 19, 2019 · 3 comments
Closed

npm install fails #1

jonathan-benn opened this issue Jul 19, 2019 · 3 comments

Comments

@jonathan-benn
Copy link

jonathan-benn commented Jul 19, 2019

Hi,

Recently, when trying to install hello-lights on a brand new laptop, I encountered the following errors:

C:\Users\MTL2_ADMIN\Desktop\laptop-traffic-light>npm install hello-lights

usb-detection@4.3.0 install C:\Users\MTL2_ADMIN\Desktop\laptop-traffic-light\node_modules\usb-detection
prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.16.0 runtime=node arch=x64 libc= platform=win32)

C:\Users\MTL2_ADMIN\Desktop\laptop-traffic-light\node_modules\usb-detection>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\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 PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Windows_NT 10.0.17763
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\MTL2_ADMIN\Desktop\laptop-traffic-light\node_modules\usb-detection
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! usb-detection@4.3.0 install: prebuild-install || node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the usb-detection@4.3.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\MTL2_ADMIN\AppData\Roaming\npm-cache_logs\2019-07-19T20_17_50_317Z-debug.log

@jordao76
Copy link
Owner

For the time being, you should build usb-detection locally, by installing the npm build tools. I think the node installer also has an option to install them. I had already reported this here: MadLittleMods/node-usb-detection#85

@jordao76
Copy link
Owner

You can now use npm install hello-lights --no-optional, and usb-detection will not be installed.

@jonathan-benn
Copy link
Author

Thanks! The package management is a bit awkward (in package.json I need to add a new line to scripts... "preinstall": "npm install hello-lights@^0.1.8 --no-optional"). However, it works! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants