NordicSemiconductor / pc-ble-driver-js

Node.js interface to the C/C++ pc-ble-driver library. API docs: https://nordicsemiconductor.github.io/pc-ble-driver-js/
Other
79 stars 41 forks source link

fix: use 'npm prefix' instead 'npm bin' #289

Open seawin opened 1 year ago

seawin commented 1 year ago

node v18 not support command npm bin, fix with npm prefix.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

ghost commented 1 year ago

Hey @seawin - is this all that is needed to get pc-ble-driver-js working with node version 18? I attempted to pull in your changes (i.e. "pc-ble-driver-js": "NordicSemiconductor/pc-ble-driver-js#pull/289" in my package.json file), but am still running into the following error when npm installing (with node version 18.17.1):

npm ERR! npm ERR! command failed npm ERR! npm ERR! command sh -c node scripts/pre-install.js && ( (which nrfconnect-build && nrfconnect-build fetch-draft) || node-pre-gyp install --fallback-to-build=false || node build.js ) npm ERR! npm ERR! Validation of nrfjprog libraries failed: Could not locate the bindings file. Tried: npm ERR! npm ERR! → /Users/USER/.npm/_cacache/tmp/git-cloneqLwjv8/node_modules/pc-nrfjprog-js/build/pc-nrfjprog-js.node npm ERR! npm ERR! → /Users/USER/.npm/_cacache/tmp/git-cloneqLwjv8/node_modules/pc-nrfjprog-js/build/Debug/pc-nrfjprog-js.node npm ERR! npm ERR! → /Users/USER/.npm/_cacache/tmp/git-cloneqLwjv8/node_modules/pc-nrfjprog-js/build/Release/pc-nrfjprog-js.node npm ERR! npm ERR! → /Users/USER/.npm/_cacache/tmp/git-cloneqLwjv8/node_modules/pc-nrfjprog-js/out/Debug/pc-nrfjprog-js.node npm ERR! npm ERR! → /Users/USER/.npm/_cacache/tmp/git-cloneqLwjv8/node_modules/pc-nrfjprog-js/Debug/pc-nrfjprog-js.node npm ERR! npm ERR! → /Users/USER/.npm/_cacache/tmp/git-cloneqLwjv8/node_modules/pc-nrfjprog-js/out/Release/pc-nrfjprog-js.node npm ERR! npm ERR! → /Users/USER/.npm/_cacache/tmp/git-cloneqLwjv8/node_modules/pc-nrfjprog-js/Release/pc-nrfjprog-js.node npm ERR! npm ERR! → /Users/USER/.npm/_cacache/tmp/git-cloneqLwjv8/node_modules/pc-nrfjprog-js/build/default/pc-nrfjprog-js.node npm ERR! npm ERR! → /Users/USER/.npm/_cacache/tmp/git-cloneqLwjv8/node_modules/pc-nrfjprog-js/compiled/18.17.1/darwin/arm64/pc-nrfjprog-js.node npm ERR! npm ERR! → /Users/USER/.npm/_cacache/tmp/git-cloneqLwjv8/node_modules/pc-nrfjprog-js/addon-build/release/install-root/pc-nrfjprog-js.node npm ERR! npm ERR! → /Users/USER/.npm/_cacache/tmp/git-cloneqLwjv8/node_modules/pc-nrfjprog-js/addon-build/debug/install-root/pc-nrfjprog-js.node npm ERR! npm ERR! → /Users/USER/.npm/_cacache/tmp/git-cloneqLwjv8/node_modules/pc-nrfjprog-js/addon-build/default/install-root/pc-nrfjprog-js.node npm ERR! npm ERR! → /Users/USER/.npm/_cacache/tmp/git-cloneqLwjv8/node_modules/pc-nrfjprog-js/lib/binding/node-v108-darwin-arm64/pc-nrfjprog-js.node npm ERR! npm ERR! Trying to install nrfjprog npm ERR! npm ERR! Downloading https://github.com/NordicSemiconductor/pc-nrfjprog-js/releases/download/nrfjprog/nrfjprog-10.12.1-darwin_arm64.tar.gz.md5 npm ERR! npm ERR! Error when installing nrfjprog libraries: Request failed with status code 404 npm ERR! npm ERR! npm ERR! A complete log of this run can be found in: /Users/USER/.npm/_logs/2023-10-18T18_31_37_802Z-debug-0.log