visual-studio-codeibm-blockchainibp-vscode-extension

IBM Blockchain platform cannot rebuild native dependencies


I trying to get the IBM Blockchain platform to work in Visual studio code (on Linux), but it keeps coming back with:

Could not rebuild native dependencies Failed to execute command "npm" with  arguments 
"rebuild, grpc, --target=6.1.5, --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 have node and npm installed

node -v
v10.17.0

and

npm -v
6.11.3

satisfying the constraints. I have visual studio code version 1.41.1. What could be thie issue?


Solution

  • The problem you are experiencing is described in this issue https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/1621

    The issue is that there are no pre-built versions of grpc used by the fabric node sdk for electron 6 currently and due to changes in newer versions of gcc the grpc node module fails to compile when it falls back to using source because of no pre-built versions

    The easiest solution is to downgrade for vscode 1.39 and install the extension.

    Alternative options are to install gcc version 7 and make that the default in your linux environment or you could install a version of linux that has gcc version 7 as the default for example ubuntu 18.04 (which would allow grpc to compile from source)