Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Could not rebuild native dependencies Failed to execute command #2534

Closed
shandilyav opened this issue Jul 17, 2020 · 2 comments
Closed

Could not rebuild native dependencies Failed to execute command #2534

shandilyav opened this issue Jul 17, 2020 · 2 comments
Labels

Comments

@shandilyav
Copy link

shandilyav commented Jul 17, 2020

I was getting this error with VS Code version 1.4,
Failed to activate extension: Failed to execute command "npm" with arguments "rebuild, grpc, --target=7.3.2, --runtime=electron, --update-binary, --fallback-to-build, --target_arch=x64, --dist-url=https://atom.io/download/electron" return code 1

so as per solution given in the comment #1621 (comment), I moved to lower version of VS Code Version: 1.39.2.
Now I am getting this error : -

Could not rebuild native dependencies Failed to execute command "npm" with arguments "rebuild, grpc, --target=4.2.12, --runtime=electron, --update-binary, --fallback-to-build, --target_arch=x64, --dist-url=https://atom.io/download/electron" return code 1. Please ensure that you have node and npm installed

I am using IBM Blockchain platform VSCode extension to develop my contracts and get locally tested before deploying to the Azure ABS HLF service.

Due to these errors I am unable to use it on my Windows 10 machine.

I tried one more solution mentioned here about rebuilding npm-
Upgrade node-gyp (#1621 (comment))

Log File

[7/17/2020 11:11:28 AM] [IMPORTANT] Log files can be found by running the Developer: Open Logs Folder command from the palette

[7/17/2020 11:11:28 AM] [INFO] Starting IBM Blockchain Platform Extension
[7/17/2020 11:11:28 AM] [INFO] openReleaseNotes
[7/17/2020 11:11:42 AM] [INFO] Attempting to require dependency: grpc
[7/17/2020 11:11:53 AM] [INFO] Error requiring dependency: Failed to load gRPC binary module because it was not installed for the current system
Expected directory: node-v69-win32-x64-unknown
Found: [node-v64-linux-x64-glibc]
This problem can often be fixed by running "npm rebuild" on the current system
Original error: Cannot find module 'c:\Users\shandilyav.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.35\node_modules\grpc\src\node\extension_binary\node-v69-win32-x64-unknown\grpc_node.node'
[7/17/2020 11:11:58 AM] [INFO] Updating native node modules
[7/17/2020 11:11:58 AM] [INFO] Rebuilding native node modules
[7/17/2020 11:14:48 AM] [INFO] > grpc@1.24.2 install C:\Users\shandilyav.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.35\node_modules\grpc
[7/17/2020 11:14:48 AM] [INFO] > node-pre-gyp install --fallback-to-build --library=static_library
[7/17/2020 11:14:54 AM] [INFO] node-pre-gyp
[7/17/2020 11:14:54 AM] [INFO] WARN Using request for node-pre-gyp https download
[7/17/2020 11:14:55 AM] [INFO] node-pre-gyp
[7/17/2020 11:14:55 AM] [INFO] WARN Pre-built binaries not installable for grpc@1.24.2 and electron@4.2.12 (electron-v4.2 ABI, unknown) (falling back to source compile with node-gyp)
[7/17/2020 11:14:55 AM] [INFO] node-pre-gyp WARN Hit error unable to get local issuer certificate
[7/17/2020 11:15:40 AM] [INFO] gyp
[7/17/2020 11:15:40 AM] [INFO] WARN install got an error, rolling back install
[7/17/2020 11:15:41 AM] [INFO] gyp
[7/17/2020 11:15:41 AM] [INFO] ERR! configure error
[7/17/2020 11:15:41 AM] [INFO] gyp ERR! stack Error: unable to get local issuer certificate
[7/17/2020 11:15:41 AM] [INFO] gyp ERR! stack at TLSSocket.onConnectSecure (_tls_wrap.js:1498:34)
[7/17/2020 11:15:41 AM] [INFO] gyp ERR! stack at TLSSocket.emit (events.js:314:20)
[7/17/2020 11:15:41 AM] [INFO] gyp ERR! stack at TLSSocket._finishInit (_tls_wrap.js:933:8)
[7/17/2020 11:15:41 AM] [INFO] gyp ERR! stack at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:707:12)
[7/17/2020 11:15:41 AM] [INFO] gyp ERR! System Windows_NT 10.0.16299
[7/17/2020 11:15:41 AM] [INFO] gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\shandilyav\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=C:\Users\shandilyav\.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.35\node_modules\grpc\src\node\extension_binary\electron-v4.2-win32-x64-unknown\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\Users\shandilyav\.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.35\node_modules\grpc\src\node\extension_binary\electron-v4.2-win32-x64-unknown" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=electron-v4.2" "--dist-url=https://atom.io/download/electron" "--python=C:\Users\shandilyav\.windows-build-tools\python27\python.exe"
[7/17/2020 11:15:41 AM] [INFO] gyp ERR! cwd C:\Users\shandilyav.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.35\node_modules\grpc
[7/17/2020 11:15:41 AM] [INFO] gyp ERR! node -v v14.5.0
[7/17/2020 11:15:41 AM] [INFO] gyp ERR! node-gyp -v v7.0.0
[7/17/2020 11:15:41 AM] [INFO] gyp ERR! not ok
[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp
[7/17/2020 11:15:41 AM] [INFO] ERR! build error
[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\shandilyav\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Users\shandilyav.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.35\node_modules\grpc\src\node\extension_binary\electron-v4.2-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\shandilyav.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.35\node_modules\grpc\src\node\extension_binary\electron-v4.2-win32-x64-unknown --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=electron-v4.2 --dist-url=https://atom.io/download/electron --python=C:\Users\shandilyav.windows-build-tools\python27\python.exe' (1)
[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp ERR! stack at ChildProcess. (C:\Users\shandilyav.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.35\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp ERR! stack at ChildProcess.emit (events.js:314:20)
[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1051:16)
[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp ERR! System Windows_NT 10.0.16299
[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\shandilyav\.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.35\node_modules\grpc\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp ERR! cwd C:\Users\shandilyav.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.35\node_modules\grpc
[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp ERR! node -v v14.5.0
[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp ERR! node-pre-gyp -v v0.14.0
[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp ERR! not ok
[7/17/2020 11:15:41 AM] [INFO] Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\shandilyav\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Users\shandilyav.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.35\node_modules\grpc\src\node\extension_binary\electron-v4.2-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\shandilyav.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.35\node_modules\grpc\src\node\extension_binary\electron-v4.2-win32-x64-unknown --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=electron-v4.2 --dist-url=https://atom.io/download/electron --python=C:\Users\shandilyav.windows-build-tools\python27\python.exe' (1)
[7/17/2020 11:15:41 AM] [INFO] npm
[7/17/2020 11:15:41 AM] [INFO] ERR! code ELIFECYCLE
[7/17/2020 11:15:41 AM] [INFO] npm ERR! errno 1
[7/17/2020 11:15:41 AM] [INFO] npm ERR!
[7/17/2020 11:15:41 AM] [INFO] grpc@1.24.2 install: node-pre-gyp install --fallback-to-build --library=static_library
[7/17/2020 11:15:41 AM] [INFO] npm ERR! Exit status 1
[7/17/2020 11:15:41 AM] [INFO] npm ERR!
[7/17/2020 11:15:41 AM] [INFO] npm ERR! Failed at the grpc@1.24.2 install script.
[7/17/2020 11:15:41 AM] [INFO] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[7/17/2020 11:15:41 AM] [INFO] npm ERR! A complete log of this run can be found in:
[7/17/2020 11:15:41 AM] [INFO] npm ERR!
[7/17/2020 11:15:41 AM] [INFO] C:\Users\shandilyav\AppData\Roaming\npm-cache_logs\2020-07-17T05_45_41_459Z-debug.log
[7/17/2020 11:15:41 AM] [ERROR] Could not rebuild native dependencies Failed to execute command "npm" with arguments "rebuild, grpc, --target=4.2.12, --runtime=electron, --update-binary, --fallback-to-build, --target_arch=x64, --dist-url=https://atom.io/download/electron" return code 1. Please ensure that you have node and npm installed
[7/17/2020 11:15:41 AM] [ERROR] Failed to activate extension: Error: Failed to execute command "npm" with arguments "rebuild, grpc, --target=4.2.12, --runtime=electron, --update-binary, --fallback-to-build, --target_arch=x64, --dist-url=https://atom.io/download/electron" return code 1
[7/17/2020 11:15:41 AM] [ERROR] Error: Failed to execute command "npm" with arguments "rebuild, grpc, --target=4.2.12, --runtime=electron, --update-binary, --fallback-to-build, --target_arch=x64, --dist-url=https://atom.io/download/electron" return code 1
at ChildProcess.child.on (c:\Users\shandilyav.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.35\build\extension\util\CommandUtil.js:76:39)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)

Attached 2 more log files.
1-Blockchain.log
2020-07-16T14_07_38_306Z-debug.log

Your Environment

VS Code Version: 1.39.2 (system setup)
Electron: 4.2.10
Node.js: 10.11.0
NPM -6.14.6
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.16299
IBM Blockchain Platform Extension: 1.0.35

@davidkel
Copy link

The log shows that you are trying to use Node v14. Suggest you use node 10

[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp ERR! node -v v14.5.0
[7/17/2020 11:15:41 AM] [INFO] node-pre-gyp ERR! node-pre-gyp -v v0.14.0

@Jakeeyturner
Copy link
Contributor

No response, closing issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants