balena-io-modules / drivelist

List all connected drives in your computer, in all major operating systems
Apache License 2.0
238 stars 90 forks source link

gyp ERR! stack Error: `gyp` failed with exit code: 1 #425

Open lukedar opened 1 year ago

lukedar commented 1 year ago

Hi I get the following error when I installed version 11.1.0 Ive tried installing gyp but it still persists.

                errorOut=prebuild-install warn This package does not support N-API version 4.2.12
prebuild-install warn install No prebuilt binaries found (target=4.2.12 runtime=napi arch=x64 libc= platform=darwin)
gyp info it worked if it ends with ok
gyp info using node-gyp@9.1.0
gyp info using node@16.19.1 | darwin | x64
gyp info find Python using Python version 3.11.2 found at "/usr/local/opt/python@3.11/bin/python3.11"
gyp info spawn /usr/local/opt/python@3.11/bin/python3.11
gyp info spawn args [
gyp info spawn args   '/Users/../.nvm/versions/node/v16.19.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/../Documents/apps/idoru-desktop/node_modules/drivelist/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/../.nvm/versions/node/v16.19.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/../.electron-gyp/4.2.12/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/lukedarham/.electron-gyp/4.2.12',
gyp info spawn args   '-Dnode_gyp_dir=/Users/lukedarham/.nvm/versions/node/v16.19.1/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/../.electron-gyp/4.2.12/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/../Documents/apps/idoru-desktop/node_modules/drivelist',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp: name 'openssl_fips' is not defined while evaluating condition 'openssl_fips != ""' in binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/../.nvm/versions/node/v16.19.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:284:16)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command "/Users/../.nvm/versions/node/v16.19.1/bin/node" "/Users/../.nvm/versions/node/v16.19.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/../Documents/apps/idoru-desktop/node_modules/drivelist
gyp ERR! node -v v16.19.1
gyp ERR! node-gyp -v v9.1.0
gyp ERR! not ok

error Command failed with exit code 1.

I am running node v 16 but have tried 12 - 18 with no luck. Should node-usb be handling this as a dependancy? Also is Python 3 the correct version I should be using?

Any help is much appreciated