IBM-Blockchain / blockchain-vscode-extension

IBM Blockchain Platform extension for Visual Studio Code (this project is no longer active)
https://marketplace.visualstudio.com/items?itemName=IBMBlockchain.ibm-blockchain-platform
Other
266 stars 156 forks source link

Failed to activate #1124

Closed donlovett closed 5 years ago

donlovett commented 5 years ago

Issue Type: Bug

From Gui Search for Extension IBM Blockchain Platform

Error appears at end of installation

Failed to activate extension: Failed to execute command "npm" with arguments "rebuild, grpc, --target=4.2.5, --runtime=electron, --dist-url=https://atom.io/download/electron, --update-binary, --fallback-to-build, --target_arch=x64" return code 243

Extension version: 1.0.4 VS Code version: Code 1.36.0 (0f3794b38477eea13fb47fbe15a42798e6129338, 2019-07-03T13:20:56.241Z) OS version: Linux x64 4.18.0-25-generic snap

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (1 x 2807)| |GPU Status|2d_canvas: unavailable_software
flash_3d: disabled_software
flash_stage3d: disabled_software
flash_stage3d_baseline: disabled_software
gpu_compositing: disabled_software
multiple_raster_threads: disabled_off
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: disabled_off
rasterization: disabled_software
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: disabled_software
viz_display_compositor: disabled_off
webgl: unavailable_software
webgl2: unavailable_software| |Load (avg)|5, 3, 2| |Memory (System)|4.37GB (0.15GB free)| |Process Argv|| |Screen Reader|no| |VM|100%|
cazfletch commented 5 years ago

Where there any more errors in the log from the output of running that command?

urdarinda commented 5 years ago

I get the error rror requiring dependency: The gRPC binary module was not installed. This may be fixed by running "npm rebuild" Original error: Cannot find module '/home/urdarinda/.vscode/extensions/ibmblockchain.ibm-blockchain-platform-1.0.4/node_modules/grpc/src/node/extension_binary/node-v69-linux-x64-glibc/grpc_node.node'

Basically, it is not able to find v69 for node, What I have is v67. How do I solve this?

cazfletch commented 5 years ago

What happens if you close and open vscode?

On Fri, 5 Jul 2019 at 17:36, Jatin Rungta notifications@github.com wrote:

I get the error rror requiring dependency: The gRPC binary module was not installed. This may be fixed by running "npm rebuild" Original error: Cannot find module '/home/urdarinda/.vscode/extensions/ibmblockchain.ibm-blockchain-platform-1.0.4/node_modules/grpc/src/node/extension_binary/node-v69-linux-x64-glibc/grpc_node.node'

Basically, it is not able to find v69 for node, What I have is v67. How do I solve this?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/1124?email_source=notifications&email_token=AFP2AMPFDSRQR24S5WMECE3P55Z7VA5CNFSM4H6AHHRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZJ5QKQ#issuecomment-508811306, or mute the thread https://github.com/notifications/unsubscribe-auth/AFP2AMPLSJKGVNPFLT62TODP55Z7VANCNFSM4H6AHHRA .

urdarinda commented 5 years ago

What happens if you close and open vscode? On Fri, 5 Jul 2019 at 17:36, Jatin Rungta @.***> wrote: I get the error rror requiring dependency: The gRPC binary module was not installed. This may be fixed by running "npm rebuild" Original error: Cannot find module '/home/urdarinda/.vscode/extensions/ibmblockchain.ibm-blockchain-platform-1.0.4/node_modules/grpc/src/node/extension_binary/node-v69-linux-x64-glibc/grpc_node.node' Basically, it is not able to find v69 for node, What I have is v67. How do I solve this? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#1124?email_source=notifications&email_token=AFP2AMPFDSRQR24S5WMECE3P55Z7VA5CNFSM4H6AHHRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZJ5QKQ#issuecomment-508811306>, or mute the thread https://github.com/notifications/unsubscribe-auth/AFP2AMPLSJKGVNPFLT62TODP55Z7VANCNFSM4H6AHHRA .

Same thing happens. Is this because of my compiler? I have gcc 8 and it seems that grpc 1.17 has some issues with that and only on grpc 1.20+ it became compatible with gcc8. I have yet to find a workaround for buillding it on gcc8

cazfletch commented 5 years ago

We are in the process of updating the version of grpc, we should hopefully be doing a release soon with it in

On Sat, 6 Jul 2019 at 01:08, Jatin Rungta notifications@github.com wrote:

What happens if you close and open vscode? … <#m5967040862666186987> On Fri, 5 Jul 2019 at 17:36, Jatin Rungta @.***> wrote: I get the error rror requiring dependency: The gRPC binary module was not installed. This may be fixed by running "npm rebuild" Original error: Cannot find module '/home/urdarinda/.vscode/extensions/ibmblockchain.ibm-blockchain-platform-1.0.4/node_modules/grpc/src/node/extension_binary/node-v69-linux-x64-glibc/grpc_node.node' Basically, it is not able to find v69 for node, What I have is v67. How do I solve this? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#1124 https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/1124?email_source=notifications&email_token=AFP2AMPFDSRQR24S5WMECE3P55Z7VA5CNFSM4H6AHHRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZJ5QKQ#issuecomment-508811306>, or mute the thread https://github.com/notifications/unsubscribe-auth/AFP2AMPLSJKGVNPFLT62TODP55Z7VANCNFSM4H6AHHRA .

Same thing happens. Is this because of my compiler? I have gcc 8 and it seems that grpc 1.17 has some issues with that and only on grpc 1.20+ it became compatible with gcc8. I have yet to find a workaround for buillding it on gcc8

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/1124?email_source=notifications&email_token=AFP2AMNA6FHODDGBVCPUGLDP57PBFA5CNFSM4H6AHHRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZKO5LI#issuecomment-508882605, or mute the thread https://github.com/notifications/unsubscribe-auth/AFP2AMOC6UZO2ULQURBLMTLP57PBFANCNFSM4H6AHHRA .

cazfletch commented 5 years ago

this is now fixed in version 1.0.5 so closing

jpenna commented 5 years ago

I am still getting it:

[7/18/2019 1:06:19 PM] [IMPORTANT] Log files can be found by running the `Developer: Open Logs Folder` command from the palette

[7/18/2019 1:06:19 PM] [INFO] Starting IBM Blockchain Platform Extension
[7/18/2019 1:06:19 PM] [INFO] Attempting to require dependency: grpc
[7/18/2019 1:06:19 PM] [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-v57-linux-x64-glibc, node-v64-linux-x64-glibc, node-v72-linux-x64-glibc]
This problem can often be fixed by running "npm rebuild" on the current system
Original error: Cannot find module '/home/juliano/.vscode/extensions/ibmblockchain.ibm-blockchain-platform-1.0.5/node_modules/grpc/src/node/extension_binary/node-v69-linux-x64-glibc/grpc_node.node'
[7/18/2019 1:06:19 PM] [INFO] Updating native node modules
[7/18/2019 1:06:19 PM] [INFO] Rebuilding native node modules
[7/18/2019 1:06:19 PM] [ERROR] Could not rebuild native dependencies spawn npm ENOENT. Please ensure that you have node and npm installed
[7/18/2019 1:06:19 PM] [ERROR] Failed to activate extension: Error: spawn npm ENOENT

I installed npm 8, 10 and 12. You are requesting v69, and I have v57, v64 and v72. I went to the plugin folder and ran npm install and npm rebuild, reinstalled the plugin, etc.

By the way, I am using Ubuntu 19.


I could fix it by changing the dependency in the plugin's package.json to use node-v57-linux-x64-glibc instead of node-v69-linux-x64-glibc. Then it ran fine.

InSuperposition commented 5 years ago

The issue still remains. I'm using macOS Mojave and nodenv for my node installation. This path to binary is listed as unkown below, node-v69-darwin-x64-unknown

[9/1/2019 4:00:56 PM] [INFO] Starting IBM Blockchain Platform Extension
[9/1/2019 4:00:56 PM] [INFO] Attempting to require dependency: grpc
[9/1/2019 4:00:56 PM] [INFO] Error requiring dependency: The gRPC binary module was not installed. This may be fixed by running "npm rebuild"
Original error: Cannot find module '/Users/fgalloway/.vscode/extensions/ibmblockchain.ibm-blockchain-platform-1.0.8/node_modules/grpc/src/node/extension_binary/node-v69-darwin-x64-unknown/grpc_node.node'
[9/1/2019 4:00:57 PM] [INFO] Updating native node modules
[9/1/2019 4:00:57 PM] [INFO] Rebuilding native node modules
[9/1/2019 4:00:57 PM] [ERROR] Could not rebuild native dependencies spawn npm ENOENT. Please ensure that you have node and npm installed
[9/1/2019 4:00:57 PM] [ERROR] Failed to activate extension: Error: spawn npm ENOENT
cazfletch commented 5 years ago

Hi @InSuperposition it looks like the extension can't find npm. From the terminal inside vscode what happens if you run npm --version?

InSuperposition commented 5 years ago

Thanks for the quick response, the output for npm --version is 6.9.0, node version is v10.16.0

cazfletch commented 5 years ago

I think the problem is to do with using nodenv. We have seen a problem where if you are using nvm which does the same thing as nodenv, then if you haven't set the default version then the extension can't find npm so it is probably something similar

InSuperposition commented 5 years ago

The global (default) version had been set. I opened a terminal then ran code and it installed properly. Previously, when the installation was failing, I was trying to open VSCode using macOS's GUI.

cazfletch commented 5 years ago

does this mean the problem is fixed?

InSuperposition commented 5 years ago

Yes. Thanks for your help, its much appreciated. It may be helpful for other users of nodenv and nvm to have documentation explaining the steps to take.

Andresmb12 commented 4 years ago

How did you set the default version?

the-inevitable commented 4 years ago

does this mean the problem is fixed?

Hi @cazfletch

I think I have similar issue.

I'm on Ubuntu 18.04

I have VS Code: 1.41.1 26076a4de974ead31f97692a0d32f90d735645c0 x64

with IBM Blockchain Platform 1.0.17 extension

Node and NPM installed using NVM.

I've set the default node to to 10.12.0 using nvm alias default 10.12.0 so that when I open VS Code, invoke a terminal session within it and enter node -v and npm -v I get v10.12.0 and 6.4.1 accordingly.

I've also tried with different Node and NPM versions starting from v8 to the latest version, it didn't work and the error remains the same.

But the extension still can't get activated with error:

`[1/10/2020 3:12:35 PM] [INFO] Starting IBM Blockchain Platform Extension [1/10/2020 3:12:36 PM] [INFO] Attempting to require dependency: grpc [1/10/2020 3:12:36 PM] [INFO] Error requiring dependency: Failed to load gRPC binary module because it was not installed for the current system Expected directory: electron-v6.1-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/vlad/.vscode/extensions/ibmblockchain.ibm-blockchain-platform-1.0.17/node_modules/grpc/src/node/extension_binary/electron-v6.1-linux-x64-glibc/grpc_node.node' Require stack:

What should I do to get the extension activated?

cazfletch commented 4 years ago

What is your path variable set to?

the-inevitable commented 4 years ago

What is your path variable set to?

@cazfletch thankis for quick reply!

which node gives me /home/{USERNAME}/.nvm/versions/node/v10.12.0/bin/node which npm gives me /home/{USERNAME}/.nvm/versions/node/v10.12.0/bin/npm

cazfletch commented 4 years ago

We have seen this problem before where the path all looks ok but to do npm rebuild which is what is failing we do a childProcess.exec and that doesn't find it. We have an open issue to move to running commands on the terminal instead which would solve the issue

the-inevitable commented 4 years ago

We have seen this problem before where the path all looks ok but to do npm rebuild which is what is failing we do a childProcess.exec and that doesn't find it. We have an open issue to move to running commands on the terminal instead which would solve the issue

@cazfletch Great to hear that!

So what is it you suggest I should do to get the extension activated? Or is there no way to do so at the moment?

cazfletch commented 4 years ago

I tihnk others that have seen the issue, get it working with a combination of closing and reopening vscode and restarting their machine

the-inevitable commented 4 years ago

I tihnk others that have seen the issue, get it working with a combination of closing and reopening vscode and restarting their machine

@cazfletch Okay, I hope the combination will work eventually, thank you

sjais789 commented 4 years ago

The issue is there is no prebuild version of grpc module for node sdk.And the latest grpc module is unable to compile. I downgraded the VS code to 1.38 and it worked. Or you can go for installing the gcc version and make it compatible according to your setup.

TheDhejavu commented 4 years ago

I'm getting thesame error

Failed to activate extension: Failed to execute command "npm" with arguments "rebuild, grpc, --target=7.1.11, --runtime=electron, --update-binary, --fallback-to-build, --target_arch=x64, --dist-url=https://atom.io/download/electron" return code 1

node -v v12.16.1 npm -v 6.12.1

the-inevitable commented 4 years ago

hei @TheDhejavu, I got it working by downgrading vs-code to 1.41. I haven't updated it since, so I'm not sure if it works on later versions.

TheDhejavu commented 4 years ago

I did that but still got the same error.

I will try version 1.41.

Thanks

cazfletch commented 4 years ago

If you update to the latest version of the extension and the latest version of vscode it should fix the problem that @TheDhejavu is seeing with rebuilding not working

TheDhejavu commented 4 years ago

Installing the extension means installing the latest version right because I just did that like 4 times. I was using the latest version and just reinstalled the extension when I got this error.

I will try everything over again.

cazfletch commented 4 years ago

yes version 1.0.24 of the extension and version 1.43 of vscode

cazfletch commented 4 years ago

if that doesn't work can you send the output log rather than just the error please

TheDhejavu commented 4 years ago

@cazfletch

[3/26/2020 8:16:17 PM] [IMPORTANT] Log files can be found by running the Developer: Open Logs Folder command from the palette

[3/26/2020 8:16:17 PM] [INFO] Starting IBM Blockchain Platform Extension [3/26/2020 8:16:17 PM] [INFO] openReleaseNotes [3/26/2020 8:16:17 PM] [INFO] Attempting to require dependency: grpc [3/26/2020 8:16:18 PM] [INFO] Error requiring dependency: Failed to load gRPC binary module because it was not installed for the current system Expected directory: electron-v7.1-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\Administrator.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.24\node_modules\grpc\src\node\extension_binary\electron-v7.1-win32-x64-unknown\grpc_node.node' Require stack:

TheDhejavu commented 4 years ago

@cazfletch This seems to be the main problem

[3/26/2020 8:50:35 PM] [INFO] Attempting to require dependency: grpc [3/26/2020 8:50:35 PM] [INFO] Error requiring dependency: Failed to load gRPC binary module because it was not installed for the current system Expected directory: electron-v7.1-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\Administrator.vscode\extensions\ibmblockchain.ibm-blockchain-platform-1.0.24\node_modules\grpc\src\node\extension_binary\electron-v7.1-win32-x64-unknown\grpc_node.node'

cazfletch commented 4 years ago

The problem is

[3/26/2020 8:16:28 PM] [INFO] ERR! find VS
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS msvs_version was set from command line or npm config
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS - looking for Visual Studio version 2017
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS checking VS2017 (15.9.28307.812) found at:
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS - found "Visual Studio C++ core features"
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS - missing any VC++ toolset
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS looking for Visual Studio 2015
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS - found in "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS - MSBuild in "C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe"
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS - msvs_version does not match this version
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS looking for Visual Studio 2013
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS - not found
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS valid versions for msvs_version:
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS - "2015"
[3/26/2020 8:16:28 PM] [INFO] gyp ERR!
[3/26/2020 8:16:28 PM] [INFO] find VS - "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS
[3/26/2020 8:16:28 PM] [INFO] gyp ERR! find VS
TheDhejavu commented 4 years ago

@cazfletch , oh, how do i fix that

cazfletch commented 4 years ago

looks like you need to install visual studio

TheDhejavu commented 4 years ago

I actually have a vsocde installed on my system

TheDhejavu commented 4 years ago

hi @cazfletch downgrading my Vscode to version 3.9 fix the problem which in turn caused another major issue for other dependencies like Azure on my vscode 😕

cazfletch commented 4 years ago

If you uninstall the other extensions and reinstall them it should install versions of them compatible with vscode 1.39

TheDhejavu commented 4 years ago

Thanks @cazfletch

VikasCanand commented 4 years ago

The issue is there is no prebuild version of grpc module for node sdk.And the latest grpc module is unable to compile. I downgraded the VS code to 1.38 and it worked. Or you can go for installing the gcc version and make it compatible according to your setup.

How did you downgrade VSCode version?

Jakeeyturner commented 4 years ago

The issue is there is no prebuild version of grpc module for node sdk.And the latest grpc module is unable to compile. I downgraded the VS code to 1.38 and it worked. Or you can go for installing the gcc version and make it compatible according to your setup.

How did you downgrade VSCode version?

https://code.visualstudio.com/updates/v1_39

You can install other versions by selecting the date & click the download link.