0

I'm tying to use this IBM extension on VSCode and it gives me this error whenever it tries to activate it. I already uninstalled and reinstalled both nodejs and npm.

Failed to activate extension: Failed to execute command "npm" with arguments 
"rebuild, grpc, --target=3.0.0, --runtime=electron, --dist-url=https://atom.io/download/electron,
--update-binary, --fallback-to-build, --target_arch=x64" return code 1
Matthew
  • 1,905
  • 3
  • 19
  • 26
Metz
  • 11
  • 1
  • What platform are you trying this on ? – david_k Jun 10 '19 at 14:11
  • Im currently using Ubuntu 16.04 – Metz Jun 11 '19 at 07:54
  • Might be worth checking you have the relevant compilers and developer tools. For example you could try `sudo apt-get install build-essential` – david_k Jun 11 '19 at 09:59
  • Thank you for the suggestion but i already had the newest version of build-essential. I'm now noticing another error came up "Could not rebuild native dependencies, Please ensure that you have node and npm installed" even though i have them installed, so I guess theres something wrong with node and npm PATH. – Metz Jun 11 '19 at 10:14
  • nvm is recommended for managing node installs. It also ensures a version of node will be on your path. Might be worth giving that a shot – david_k Jun 11 '19 at 10:51
  • Ok, so I used nvm to install v10 of Node (i was using v8 before)and now the extension works. – Metz Jun 11 '19 at 13:24
  • It should be noted that Fabric only supports Node 8.9.x. Building on v10 is likely to cause problems with instantiating Chaincode. If you go back to Node 8.9.x can you make sure you have the newest version of NPM `npm install -g npm`. Most of the errors we see are related to old versions of NPM. – lindluni Jun 12 '19 at 00:53
  • the version of node/npm for chaincode is controlled by fabric. For 1.4 it is node 8.11.3 and npm 5.6.0. For client side, the latest version of Node 8 is always recommended. Node 10 should also work. However this version of node is related to the version used by the IBM Blockchain extension and as such node 8 and node 10 should both work. – david_k Jun 13 '19 at 11:11

0 Answers0