PC BLE Driver JS Installation

Hello, 

Our aim is to install "pc-ble-driver-js" and use the connectivity board for the serialization process.


We are following this link to get this working https://github.com/NordicSemiconductor/pc-ble-driver-js


The node version is v16.14.2
The npm version is 8.5.0
After executing the first step( i.e command "npm install pc-ble-driver-js") we are facing the following errors and warning

C:\Users\info>npm install pc-ble-driver-js
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path C:\Users\info\node_modules\pc-ble-driver-js
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node do_prebuild.js --decompress-only || node do_prebuild.js --install-only || node do_prebuild.js
npm ERR! options.shared_install_dir:C:\Users\info\node_modules\pc-ble-driver-js\Release
npm ERR! options.shared_install_dir:C:\Users\info\node_modules\pc-ble-driver-js\Release
npm ERR! options.shared_install_dir:C:\Users\info\node_modules\pc-ble-driver-js\Release
npm ERR! C:\Users\info\node_modules\pc-ble-driver-js\do_prebuild.js:219
npm ERR!     throw new Error("npm_config_runtime needs to be specified");
npm ERR!     ^
npm ERR!
npm ERR! Error: npm_config_runtime needs to be specified
npm ERR!     at Object.<anonymous> (C:\Users\info\node_modules\pc-ble-driver-js\do_prebuild.js:219:11)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1103:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR!     at node:internal/main/run_main_module:17:47
npm ERR! C:\Users\info\node_modules\pc-ble-driver-js\do_prebuild.js:219
npm ERR!     throw new Error("npm_config_runtime needs to be specified");
npm ERR!     ^
npm ERR!
npm ERR! Error: npm_config_runtime needs to be specified
npm ERR!     at Object.<anonymous> (C:\Users\info\node_modules\pc-ble-driver-js\do_prebuild.js:219:11)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1103:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR!     at node:internal/main/run_main_module:17:47
npm ERR! C:\Users\info\node_modules\pc-ble-driver-js\do_prebuild.js:219
npm ERR!     throw new Error("npm_config_runtime needs to be specified");
npm ERR!     ^
npm ERR!
npm ERR! Error: npm_config_runtime needs to be specified
npm ERR!     at Object.<anonymous> (C:\Users\info\node_modules\pc-ble-driver-js\do_prebuild.js:219:11)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1103:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR!     at node:internal/main/run_main_module:17:47

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\info\AppData\Local\npm-cache\_logs\2022-04-04T07_47_24_455Z-debug-0.log

C:\Users\info>

Please let us know why we are facing these errors.

Thanks,
Sakib

 

Parents Reply Children
  • Hello Jorgen Holmefjord,

    We tried following the steps present on the linked page, following are the errors that we are getting

    fakhruddin@linux:~$ node --version
    v14.18.3
    fakhruddin@linux:~$ npm --version
    6.14.15
    fakhruddin@linux:~$ export npm_config_runtime=node
    fakhruddin@linux:~$ export npm_config_target=14.18.3
    fakhruddin@linux:~$ npm install pc-ble-driver-js
    npm ERR! Error while executing:
    npm ERR! /usr/bin/git ls-remote -h -t git://github.com/NordicPlayground/prebuild.git
    npm ERR! 
    npm ERR! fatal: remote error: 
    npm ERR!   The unauthenticated git protocol on port 9418 is no longer supported.
    npm ERR! Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
    npm ERR! 
    npm ERR! exited with error code: 128
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/fakhruddin/.npm/_logs/2022-04-05T08_46_12_711Z-debug.log
    fakhruddin@linux:~$ ^C
    fakhruddin@linux:~$

    Thanks
    Sakib

  • Hi,

    Looks like GitHub removed support for git:// links. Can you try the following command?

    npm install github:NordicSemiconductor/pc-ble-driver-js#release/v2.8

    We need to do a new release to fix the issue for the normal "npm install pc-ble-driver-js" command.

    Best regards,
    Jørgen

Related