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

Failed to load extension #398

Closed
26rahulsingh opened this issue Dec 3, 2018 · 50 comments
Closed

Failed to load extension #398

26rahulsingh opened this issue Dec 3, 2018 · 50 comments
Assignees
Labels
bug Something isn't working external sev1

Comments

@26rahulsingh
Copy link

NodeJS v8.13.0 installed using NVM
npm version 6.4.1
Ubuntu 18.04

extension activating
Updating native node modules
Rebuilding native node modules
Could not rebuild native dependencies spawn npm ENOENT. Please ensure that you have node and npm installed
Failed to activate extension see previous messages for reason

@heatherlp
Copy link
Contributor

Hi @26rahulsingh - can you retry this with the latest version of the extension? It's 0.0.7

@heatherlp heatherlp added the bug Something isn't working label Dec 6, 2018
@26rahulsingh
Copy link
Author

Hello @heatherlp - I got the same error with the latest version 0.0.7

@shineparamel
Copy link

Same here. Is there any possibility to try in the previous version

@heatherlp
Copy link
Contributor

@shineparamel are you on Ubuntu too?

@mahoney1
Copy link

mahoney1 commented Dec 12, 2018

As discussed @heatherlp, get the same error - Also using Ubuntu. v16.04.1, VSCode 1.29.1, with node 8.11.4, npm 5.6. Tried with IBP VSCode ext 0.1.0 fyi - screenshot below
image

@rthatcher
Copy link
Contributor

rthatcher commented Dec 12, 2018

v0.1.0 activates OK on my Ubuntu VM - Ubuntu 18.04.1 LTS
(VsCode 1.28.2 . Node 8.9.3 npm 6.4.1)

On my older VM - Ubuntu 16.04.5 LTS
The extension upgraded itself to 0.1.0 and activated OK too !
(VSCode 1.27.2 Node 8.11.3 . npm 6.2.0)

@mahoney1
Copy link

mahoney1 commented Dec 12, 2018

FYI got it working (activated!). Here's what I did: 1) uninstalled node 8.11.4, npm 5.6 completely on my system. 2) I then reinstalled (node 8.11.4 again, but with npm 6.4.1. 3) I removed the ibm-blockchainxx extension (directory) from $HOME/.vscode. 4) I launched VSCode, installed the extension, 0.1.0 and reloaded/activated, got past the rebuild. output below.

Rebuilding native node modules

> grpc@1.14.2 install /home/ibm/.vscode/extensions/ibmblockchain.ibm-blockchain-platform-0.1.0/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp
 
WARN
 Using request for node-pre-gyp https download 
[grpc] Success: "/home/ibm/.vscode/extensions/ibmblockchain.ibm-blockchain-platform-0.1.0/node_modules/grpc/src/node/extension_binary/electron-v2.0-linux-x64-glibc/grpc_node.node" is installed via remote
grpc@1.14.2 /home/ibm/.vscode/extensions/ibmblockchain.ibm-blockchain-platform-0.1.0/node_modules/grpc
Updating grpc
Finished updating native node modules
extension activated

@piaste
Copy link

piaste commented Dec 12, 2018

I'm encountering a failure with a similar but not identical reason:

extension activating
Updating native node modules
Rebuilding native node modules

> grpc@1.14.2 install C:\Users\piaste\.vscode\extensions\ibmblockchain.ibm-blockchain-platform-0.1.0\node_modules\grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp
 WARN Using request for node-pre-gyp https download 
[grpc] Success: "C:\Users\piaste\.vscode\extensions\ibmblockchain.ibm-blockchain-platform-0.1.0\node_modules\grpc\src\node\extension_binary\electron-v2.0-win32-x64-unknown\grpc_node.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
grpc@1.14.2 C:\Users\piaste\.vscode\extensions\ibmblockchain.ibm-blockchain-platform-0.1.0\node_modules\grpc
Updating grpc
Failed to activate extension see previous messages for reason

Environment:

Win10 x64 1803
Node 10.14.2
npm 6.4.1
VSCode 1.29.1

Completely wiped and reinstalled Node and npm and cleared the extension folder just to be sure, no change.

I looked at the source for the dependency installer, and the command executed should be this:

npm rebuild grpc@1.14.2 --target=2.0.0 --runtime=electron --dist-url=https://atom.io/download/electron --verbose

which completes successfully if I run it manually from the extension folder, with the same log as above (minus the last two lines)

Since I don't get the Finished updating native node modules log nor the Could not rebuild native dependencies one, and grpc is the only native dependency, I'm not sure where to look next.

@rthatcher
Copy link
Contributor

I think there is a problem with grpc and Node v10 - can you try Node v8 instead of Node v10?

@shineparamel
Copy link

@shineparamel are you on Ubuntu too?

Yes Ubuntu

@piaste
Copy link

piaste commented Jan 2, 2019

@rthatcher

Thanks, installing 8 fixed that issue :)

I later tried upgrading to 11 to see if it solved another problem (see #436) and the error didn't reappear either.

@cazfletch cazfletch added the sev1 label Jan 18, 2019
@Jakeeyturner Jakeeyturner self-assigned this Feb 12, 2019
Jakeeyturner added a commit to Jakeeyturner/blockchain-vscode-extension that referenced this issue Feb 12, 2019
Signed-off-by: Jake Turner <jaketurner25@live.com>
Jakeeyturner added a commit to Jakeeyturner/blockchain-vscode-extension that referenced this issue Feb 12, 2019
Signed-off-by: Jake Turner <jaketurner25@live.com>
@jentityframework
Copy link

@piaste
Can you run with node 11?

@jentityframework
Copy link

jentityframework commented Mar 28, 2019

Windows 10 Pro
NodeJS: v11.12.0 or v8
npm: 6.9.0
yo: 2.0.5
Docker version 18.09.2, build 6247962
docker-compose version 1.23.2, build 1110ad01

[3/28/2019 8:32:13 AM] [IMPORTANT] Log files can be found by running the Developer: Open Logs Folder command from the palette

[3/28/2019 8:32:14 AM] [INFO] Starting IBM Blockchain Platform Extension
[3/28/2019 8:32:14 AM] [INFO] Updating native node modules
[3/28/2019 8:32:14 AM] [INFO] Rebuilding native node modules
[3/28/2019 8:32:34 AM] [INFO] > grpc@1.17.0 install C:\Users\Tri Phan.vscode\extensions\ibmblockchain.ibm-blockchain-platform-0.3.2\node_modules\grpc
[3/28/2019 8:32:34 AM] [INFO] > node-pre-gyp install --fallback-to-build --library=static_library
[3/28/2019 8:32:36 AM] [INFO] node-pre-gyp
[3/28/2019 8:32:36 AM] [INFO]
[3/28/2019 8:32:36 AM] [INFO] WARN Using request for node-pre-gyp https download
[3/28/2019 8:32:38 AM] [INFO] [grpc] Success: "C:\Users\Tri Phan.vscode\extensions\ibmblockchain.ibm-blockchain-platform-0.3.2\node_modules\grpc\src\node\extension_binary\electron-v3.0-win32-x64-unknown\grpc_node.node" is installed via remote
[3/28/2019 8:32:38 AM] [INFO] grpc@1.17.0 C:\Users\Tri Phan.vscode\extensions\ibmblockchain.ibm-blockchain-platform-0.3.2\node_modules\grpc
[3/28/2019 8:32:38 AM] [INFO] Updating grpc
[3/28/2019 8:32:38 AM] [ERROR] Failed to activate extension see previous messages for reason

@kafcioo
Copy link

kafcioo commented Apr 29, 2019

I have the same problem and duno where to look now for a solution
Running Ubuntu 16.4
npm 5.10
node 8.16
and all other Prerequisites seem to have correct versioning

@jentityframework
Copy link

@kafcioo: I suggest you remove installation folder of this extions and reinstall again. I did with this way and I can run it now

@Raumo0
Copy link

Raumo0 commented May 12, 2019

This error still exists, I have this problem. I cannot install the blockchain vscode extension.


[5/12/2019 4:51:37 PM] [IMPORTANT] Log files can be found by running the `Developer: Open Logs Folder` command from the palette

[5/12/2019 4:51:37 PM] [INFO] Starting IBM Blockchain Platform Extension
[5/12/2019 4:51:37 PM] [INFO] Updating native node modules
[5/12/2019 4:51:37 PM] [INFO] Rebuilding native node modules
[5/12/2019 4:51:37 PM] [ERROR] Could not rebuild native dependencies spawn npm ENOENT. Please ensure that you have node and npm installed
[5/12/2019 4:51:37 PM] [ERROR] Failed to activate extension see previous messages for reason

I tried to reinstall nvm, node, npm, yo.. reinstall the extension with installetion folder, reinstall vscode etc.

My dev env:

nvm:0.34.0
node:8.11.4, 10.0.0, 11.0.0 12.2.0
npm:5.6.0, 6.4.1, 6.9.0
yo:2.0.6
vscode:Version: 1.33.1
OS:Ubuntu 18.04.1

@jentityframework , @mahoney1 I also tried the options you suggested, but they did not help me.
@Jakeeyturner

@bernarddk
Copy link

Same issue as @Raumo

nvm:0.34.0
node:8.9.4
npm:5.6.0
vscode:Version: 1.33.1
MacOS 10.14.4

@jessezwd
Copy link

Same issue under Archlinux:
node: 10.16.0
npm: 5.9.0
vscode: 1.36.1
OS: Linux x64 5.1.15-1-MANJARO

@cazfletch
Copy link
Contributor

Do you have the error message? Also if you scroll back in the log are there any other errors?

@cazfletch cazfletch reopened this Jul 10, 2019
@jessezwd
Copy link

@cazfletch the error message is the following:
Could not rebuild native dependencies 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 1. Please ensure that you have node and npm installed

@Jazibabdullah
Copy link

Same issue as @jessezwd
npm : 6.10.0
node :v12.6.0
code : 1.36.1
OS : Windows 10

@mloetscher
Copy link

Same issue here:
npm : 6.10.0
node : v10.16.0
code : 1.36.1
OS : macOS 10.14.5

@shineparamel
Copy link

shineparamel commented Jul 15, 2019 via email

@cazfletch
Copy link
Contributor

closing as version 1.0.5 should fix this. If you are still having issues please open a new issue for it

@feras-shamashan-coriel
Copy link

@cazfletch, I installed the extension and it worked once only and in the next time I tried to use it, it stopped working throwing the following error:

Could not rebuild native dependencies spawn npm ENOENT. Please ensure that you have node and npm installed.

Failed to activate extension: spawn npm ENOENT.

node: v8.16.0
npm: 6.4.1
I am using ubuntu as VM.

So far, I have tried the following:

1 - different version od node and npm
2- delete and install node again

Wondering if you have any other suggestions about that!

Thanks in advance :)

@cazfletch
Copy link
Contributor

Hi @feras-shamashan-coriel if from the terminal inside vscode what happens if you run npm --version?

@feras-shamashan-coriel
Copy link

Hi @cazfletch, thank you for your replay. Inside the vscode terminal:
node --version v8.16.0
npm --version 6.4.1

@cazfletch
Copy link
Contributor

how is node and npm installed?

@feras-shamashan-coriel
Copy link

I have used those command:

sudo apt-get install nodejs
sudo apt-get install npm

@cazfletch
Copy link
Contributor

did you have to update any env vars after?

@feras-shamashan-coriel
Copy link

No, I didn't change anything. It was working, I restarted my OS and it stopped.

@feras-shamashan-coriel
Copy link

If this log could help:

[12/08/2019 16:26:24] [IMPORTANT] Log files can be found by running the Developer: Open Logs Folder command from the palette

[12/08/2019 16:26:24] [INFO] Starting IBM Blockchain Platform Extension
[12/08/2019 16:26:24] [INFO] Attempting to require dependency: grpc
[12/08/2019 16:26:24] [INFO] Error requiring dependency: The gRPC binary module was not installed. This may be fixed by running "npm rebuild"
Original error: Cannot find module '/home/xxxxxx/.vscode/extensions/ibmblockchain.ibm-blockchain-platform-1.0.6/node_modules/grpc/src/node/extension_binary/node-v69-linux-x64-glibc/grpc_node.node'
[12/08/2019 16:26:24] [INFO] Updating native node modules
[12/08/2019 16:26:24] [INFO] Rebuilding native node modules
[12/08/2019 16:26:24] [ERROR] Could not rebuild native dependencies spawn npm ENOENT. Please ensure that you have node and npm installed
[12/08/2019 16:26:24] [ERROR] Failed to activate extension: Error: spawn npm ENOENT

@cazfletch
Copy link
Contributor

The problem is that from within vscode it isn't finding npm. I thought that running npm --version from the vscode terminal would show the same problem. I suspect it's something to do with the path environment variable.

As a work around you can follow these instructions #1205 (comment)

@feras-shamashan-coriel
Copy link

Hi @cazfletch , I followed your instructions and all worked perfectly. Thank you so much :)

@greysou1
Copy link

greysou1 commented Sep 5, 2019

I tried various solutions but didn't help. I finally tried uninstalling node and downloading from their website and it simply worked. Maybe it was related to $PATH not being set properly, hope this helps someone.

@Krishna812
Copy link

Krishna812 commented Feb 1, 2020

image

I tried to uninstall and reinstallation of node, vs code and ibm extensions. but it didnt work. Kindly help to resolve this issue

PS C:\Users\kishu> node -v
v12.14.1
PS C:\Users\kishu> npm -v
6.13.4

@Sinha199
Copy link

image

I tried to uninstall and reinstallation of node, vs code and ibm extensions. but it didnt work. Kindly help to resolve this issue

PS C:\Users\kishu> node -v
v12.14.1
PS C:\Users\kishu> npm -v
6.13.4

the node version should be 8.x or 10.x only

@Sinha199
Copy link

@cazfletch
Could not rebuild native dependencies Failed to execute command "npm" with arguments "rebuild, grpc, --target=6.1.6, --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

The following issue is being shown. All the related versions and dependencies have been installed correctly.

@cazfletch
Copy link
Contributor

Hi @Sinha199 can you open a seperate issue for this please

@Pdarsh
Copy link

Pdarsh commented May 19, 2020

  • IBM Blockchain Platform Extension Version:1.0.28
  • Visual Studio Code version:1.45.1
  • Node.js v8.15.0, npm v6.4.1:
  • Operating System and version: Ubuntu 18.04

Problem-
Could not rebuild native dependencies Failed to execute command "npm" with arguments "rebuild, grpc, --target=7.2.4, --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

@cazfletch
Copy link
Contributor

Hi @Pdarsh could you post the output from the blockchain output please

@Pdarsh
Copy link

Pdarsh commented May 19, 2020

VirtualBox_ubuntu_19_05_2020_15_50_03

@cazfletch
Copy link
Contributor

@Pdarsh can you switch from the terminal view to the output view and post the contents of it please

@Pdarsh
Copy link

Pdarsh commented May 21, 2020

it started working thanks for your concern..

@littlestar642
Copy link

Seems like the ideal configuration of your machine that should make the extension work is

node: 10.20.1
npm - 6.14.4
vscode - version - 1.39.0
extension version - 1.0.27

You should ensure that you are using the correct versions of these softwares and remove and conflicting files that might pose problems for example other code versions. I would recommend to use nvm for setting your node versions

@yasharne
Copy link

The solution for me was to download the latest version of vsix file from the GitHub page

@subhodi
Copy link

subhodi commented Sep 17, 2020

I had installed Node using NVM and VScode could not pick that up. Installed NodeJS v10 from this digitalocean link (https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-18-04)

cd  ~
curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs
sudo apt install build-essential

You can try installing Node 10 from the official website too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working external sev1
Projects
None yet
Development

No branches or pull requests