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?

  • Hi,

    You can download nRF Connect for desktop directly from this link, not need to build the project.

    BR,

    Marjeris

  • I know.  I meant to say I was trying to build it to chase a problem running an app being developed.  This worked in a previous nRF Connect version (2.2.0? don't have it handy) but fails in the current version.  That failure is (apparently, but that's why I wanted was trying to build nRF-C): I can connect to my device, get the list of available characteristics whether custom or generic (like Device Info), but clicking on any (Device Info) nothing happens, and from tracing in my app it appears nothing was even sent.

    BTW, I tried to build the "working" nRF Connect both back then and now, and never have been able to build any version.

  • Hi Marty,

    I talked to our nRF Connect for desktop developers and they want more information from you. Could you provide:

    1. Which nodejs version are you using?
    2. Which branch of pc-nrfconnect-core are you using (not pc-nrfconnect-ble)?
    3. What are the concrete steps you are following for building pc-nrfconnect-core?
    4. If you can, please provide full log if you still fail to build.

    Best regards,

    Marjeris

  • 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
Related