Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue in electron with Usb binding configuration?

I am facing an issue to install USB modules in my electron app. When i tried to install electron and their dependency i'm getting below issues always. Please someone help me to achieve this.

if any one does same thing please provide any link or instruction document it will helps me to move forwards.

> [email protected] install C:\Users\\AppData\Roaming\npm\node_modules\master-electron
> prebuild-install || node-gyp rebuild


C:\Users\\AppData\Roaming\npm\node_modules\master-electron>if not defined npm_config_node_gyp (node "C:\Users\\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\ranganathan.e\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON

gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\AppData\Roaming\npm\node_modules\master-electron
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\AppData\Roaming\npm-cache\_logs\2020-02-26T13_40_04_660Z-debug.log
like image 890
RANGANATHAN Avatar asked Dec 06 '25 05:12

RANGANATHAN


1 Answers

According logs that provided by you, It says build script can't find Python. Electron uses node-gyp for build itself, that needs to install python and Visual Studio Build Tools.

I recommend to you install windows-build-tools on npm. It can installed by using command npm install --global windows-build-tools.

like image 90
Hoto Cocoa Avatar answered Dec 07 '25 19:12

Hoto Cocoa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!