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

Failed to activate extension: Failed to execute command "npm" with arguments "rebuild, grpc, --target=4.2.12 #2781

Closed
Ahmeds168 opened this issue Nov 1, 2020 · 10 comments

Comments

@Ahmeds168
Copy link

Following is full error
"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

My IBM Blockchain Extension was working correctly untill I opened contract folder of my project from VSCODE and then the entension was unable to restart. since then I am facing this issue.

@anneBD38
Copy link

anneBD38 commented Nov 1, 2020

Same issue for me. Completely stuck

@Ahmeds168
Copy link
Author

Ahmeds168 commented Nov 2, 2020

@Jakeeyturner Please. need your help

@Jakeeyturner
Copy link
Contributor

Hello,

Please can you paste the entire output log?
I suspect the fix is #1621 (comment), but I'll need to see the entire output to know for sure.

Thanks,
Jake

@Ahmeds168
Copy link
Author

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

Failed to activate extension: 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

I have installed both npm(v6.14.8) and node(v14.15).

@Ahmeds168
Copy link
Author

and ubuntu version is 16

@Ahmeds168
Copy link
Author

vscode version 1.38

@Jakeeyturner
Copy link
Contributor

Jakeeyturner commented Nov 4, 2020

As the prerequisites state you need to use either Node 10 or 12. Please change your version of Node and try again.

Screenshot 2020-11-04 at 09 37 34

If that fails please select `Output`, make sure `Blockchain` is selected from the dropdown on the right, then copy the entire log here.

@Ahmeds168
Copy link
Author

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

[11/4/2020 7:42:27 AM] [INFO] Starting IBM Blockchain Platform Extension
[11/4/2020 7:42:27 AM] [INFO] Attempting to require dependency: grpc
[11/4/2020 7:42:27 AM] [INFO] Error requiring dependency: Failed to load gRPC binary module because it was not installed for the current system
Expected directory: node-v69-linux-x64-glibc
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 '/home/ahmed/.vscode/extensions/ibmblockchain.ibm-blockchain-platform-1.0.39/node_modules/grpc/src/node/extension_binary/node-v69-linux-x64-glibc/grpc_node.node'
[11/4/2020 7:42:55 AM] [INFO] Updating native node modules
[11/4/2020 7:42:55 AM] [INFO] Rebuilding native node modules
[11/4/2020 7:42:55 AM] [INFO] npm
[11/4/2020 7:42:55 AM] [INFO] WARN npm npm does not support Node.js v14.15.0
[11/4/2020 7:42:55 AM] [INFO] npm WARN npm You should probably upgrade to a newer version of node as we
[11/4/2020 7:42:55 AM] [INFO] npm WARN npm can't make any promises that npm will work with this version.
[11/4/2020 7:42:55 AM] [INFO] npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
[11/4/2020 7:42:55 AM] [INFO] npm WARN npm You can find the latest version at https://nodejs.org/
[11/4/2020 7:42:55 AM] [INFO] npm
[11/4/2020 7:42:55 AM] [INFO] ERR! cb.apply is not a function
[11/4/2020 7:42:55 AM] [INFO] npm
[11/4/2020 7:42:55 AM] [INFO]
[11/4/2020 7:42:55 AM] [INFO] ERR!
[11/4/2020 7:42:55 AM] [INFO] A complete log of this run can be found in:
[11/4/2020 7:42:55 AM] [INFO] npm
[11/4/2020 7:42:55 AM] [INFO]
[11/4/2020 7:42:55 AM] [INFO] ERR! /home/ahmed/.npm/_logs/2020-11-04T12_42_55_326Z-debug.log
[11/4/2020 7:42:55 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
[11/4/2020 7:42:55 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
[11/4/2020 7:42:55 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.sendCommandWithOutput.child.on (/home/ahmed/.vscode/extensions/ibmblockchain.ibm-blockchain-platform-1.0.39/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)

@Ahmeds168
Copy link
Author

I have switched to node 10 and tried to run npm rebuild in /.vscode/extensions/ibmblockchain.ibm-blockchain-platform-1.0.39. but the problems persists

@Ahmeds168
Copy link
Author

The issue was resolved when I uninstalled nodejs,npm,nvm(everything about node). and then I installed nodejs9 and npm and nvm latest version.

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

No branches or pull requests

3 participants