This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can't Build nRF Connect 3.2.0

I'm running Windows 10 and loaded pc-nrfconnect-ble-231-master from GitHub,

Per the README I npm installed windows-build-tools, then npm install.

I got some warnings about modules requiring specific revs of other modules, most of which I fixed, but I can't fix this error:

39548 error code ELIFECYCLE                                                     
39549 error errno 7                                                             
39550 error [email protected] install: `prebuild-install --verbose || node-gyp rebuild` 
39550 error Exit status 7                                                       
39551 error Failed at the [email protected] install script.                             

Any clues?

Parents
  • I'm using node v10.15.0.

    I cloned pc-nrfconnect-core version 3.2.0 from github, SHA1 ID ddac111911953d90458cf0b0dc6153f3fe2f37dd (dated 9-6-18).

    Per the README.md, for Windows, I did:

        npm install --global --production windows-build-tools

        npm install

    This produced the 2 attached files: xxx-console.txt (captured console output) and xxx-debug.log (the automatically logged file).

    The console shows 2 errors: 1) Can't find MSBuild (seems to be a common problem for MSVS 2019) and 2) error running [email protected] script.

    Any help on both issues appreciated.

    -Marty

    C:\Users\mjenk\Documents\bh\pc-nrfconnect-3.2>npm install
    
    > @serialport/[email protected] install C:\Users\mjenk\Documents\bh\pc-nrfconnect-3.2\node_modules\@serialport\bindings
    > prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
    
    
    > [email protected] install C:\Users\mjenk\Documents\bh\pc-nrfconnect-3.2\node_modules\usb
    > prebuild-install --verbose || node-gyp rebuild
    
    prebuild-install info begin Prebuild-install version 5.3.2
    prebuild-install info looking for cached prebuild @ C:\Users\mjenk\AppData\Roaming\npm-cache\_prebuilds\d4ed21-usb-v1.6.0-electron-v70-win32-x64.tar.gz
    prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.0/usb-v1.6.0-electron-v70-win32-x64.tar.gz
    prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.0/usb-v1.6.0-electron-v70-win32-x64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=5.0.6 runtime=electron arch=x64 libc= platform=win32)
    
    C:\Users\mjenk\Documents\bh\pc-nrfconnect-3.2\node_modules\usb>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! UNCAUGHT EXCEPTION
    gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\15.0\Bin\MSBuild.exe ENOENT
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
    gyp ERR! stack     at onErrorNT (internal/child_process.js:407:16)
    gyp ERR! stack     at process._tickCallback (internal/process/next_tick.js:63:19)
    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\mjenk\Documents\bh\pc-nrfconnect-3.2\node_modules\usb
    gyp ERR! node -v v10.15.0
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! This is a bug in `node-gyp`.
    gyp ERR! Try to update node-gyp and file an Issue if it does not help:
    gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
    npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\mjenk\Documents\bh\pc-nrfconnect-3.2\node_modules\usb\node_modules'
    npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of react@^15.5.0 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of react-dom@^15.5.0 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of eslint@^4.19.1 || ^5.3.0 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of eslint@^4.19.1 || ^5.3.0 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] license should be a valid SPDX license expression
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 7
    npm ERR! [email protected] install: `prebuild-install --verbose || node-gyp rebuild`
    npm ERR! Exit status 7
    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\mjenk\AppData\Roaming\npm-cache\_logs\2019-09-19T16_15_50_677Z-debug.log
    
    C:\Users\mjenk\Documents\bh\pc-nrfconnect-3.2>
    
    
    2019-09-19T16_15_50_677Z-debug.log

  • Hi,

    The cause of the error is that the node-usb module does not provide proper binary binding according to https://github.com/tessel/node-usb/issues/317.

    This issue has been fixed in node-usb and merged to its master but  has not been released yet. This issue will be gone when they have a new release. However, we dont know when they will have a new release.

    Now, to build our pc-nrfconnect-core, you need a temporary solution.

    Either you install MS Visual Studio and it will solve the problem but it may take some time to install it.

    Or try something according to https://github.com/nodejs/node-gyp/issues/1747 after you have run npm install --global --production windows-build-tools

    1. npm config set python python2.7
    2. npm config set msvs_version 2015
Reply Children
No Data
Related