pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

Hydrogen fails to activate: No native build was found for ...

Open humanplayer2 opened this issue 2 years ago • 12 comments

Thanks in advance for your bug report!

  • [X] Have you reproduced issue in safe mode?
  • [X] Have you used the debugging guide to try to resolve the issue?
  • [X] Have you checked our FAQs to make sure your question isn't answered there?
  • [X] Have you checked to make sure your issue does not already exist?
  • [X] Have you checked you are on the latest release of Pulsar?

What happened?

Hydrogen package fails to activate with the following error:

Failed to activate the Hydrogen package

No native build was found for platform=linux arch=x64 runtime=electron abi=87 uv=1 libc=glibc node=14.16.0 electron=12.2.3
    loaded from: /home/username/.pulsar/packages/Hydrogen/node_modules/zeromq
Hide Stack Trace
Error: No native build was found for platform=linux arch=x64 runtime=electron abi=87 uv=1 libc=glibc node=14.16.0 electron=12.2.3
    loaded from: /home/username/.pulsar/packages/Hydrogen/node_modules/zeromq
    at Function.load.resolve.load.path (/home/username/.pulsar/packages/Hydrogen/node_modules/node-gyp-build/node-gyp-build.js:60:9)
    at load (/home/username/.pulsar/packages/Hydrogen/node_modules/node-gyp-build/node-gyp-build.js:22:30)
    at Object.<anonymous> (/home/username/.pulsar/packages/Hydrogen/node_modules/zeromq/binding.js:1:198)
    at Object.<anonymous> (/home/username/.pulsar/packages/Hydrogen/node_modules/zeromq/binding.js:3:3)
    at Module._compile (/opt/Pulsar/resources/app.asar/src/native-compile-cache.js:120:30)
    at Object.value [as .js] (/opt/Pulsar/resources/app.asar/src/compile-cache.js:252:23)
    at Module.load (internal/modules/cjs/loader.js:935:32)
    at Module._load (internal/modules/cjs/loader.js:776:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Function.o._load (electron/js2c/renderer_init.js:33:379)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (/opt/Pulsar/resources/app.asar/src/native-compile-cache.js:67:27)
    at Object.<anonymous> (/home/username/.pulsar/packages/Hydrogen/node_modules/zeromq/lib/index.js:6:11)
    at Object.<anonymous> (/home/username/.pulsar/packages/Hydrogen/node_modules/zeromq/lib/index.js:857:3)
    at Module._compile (/opt/Pulsar/resources/app.asar/src/native-compile-cache.js:120:30)
    at Object.value [as .js] (/opt/Pulsar/resources/app.asar/src/compile-cache.js:252:23)
    at Module.load (internal/modules/cjs/loader.js:935:32)
    at Module._load (internal/modules/cjs/loader.js:776:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Function.o._load (electron/js2c/renderer_init.js:33:379)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (/opt/Pulsar/resources/app.asar/src/native-compile-cache.js:67:27)
    at Object.<anonymous> (/home/username/.pulsar/packages/Hydrogen/node_modules/zeromq/index.js:2:18)
    at Object.<anonymous> (/home/username/.pulsar/packages/Hydrogen/node_modules/zeromq/index.js:3:3)
    at Module._compile (/opt/Pulsar/resources/app.asar/src/native-compile-cache.js:120:30)
    at Object.value [as .js] (/opt/Pulsar/resources/app.asar/src/compile-cache.js:252:23)
    at Module.load (internal/modules/cjs/loader.js:935:32)
    at Module._load (internal/modules/cjs/loader.js:776:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Function.o._load (electron/js2c/renderer_init.js:33:379)

Pulsar version

1.101.0-beta

Which OS does this happen on?

🐧 Debian based (Linux Mint, Ubuntu, etc.)

OS details

Pop!_OS 22.04

Which CPU architecture are you running this on?

None

What steps are needed to reproduce this?

  1. Install the most recent release of Hydrogen: pulsar -p install https://github.com/nteract/hydrogen/ -b v2.16.5
  2. Rebuild because someone suggested so: pulsar -p rebuild
  3. Open Pulsar, choose "Start Local Kernel" in command palette.

Additional Information:

I have Hydrogen working in Atom. It requires ipykernel:

python3 -m pip install ipykernel
python3 -m ipykernel install --user

humanplayer2 avatar Jan 29 '23 12:01 humanplayer2

I answered you on Reddit, but for posterity, the fix is this:

cd ~/.pulsar/packages/hydrogen  # or the equivalent on windows
npx electron-rebuild -v 12.2.3

Then relaunch Pulsar or run Window: Reload.

If this fixes it for you, let me know, and we can close this bug.

savetheclocktower avatar Feb 24 '23 22:02 savetheclocktower

Thank you! Issue solved -- Pulsar conversion achieved!

On Pop!_OS 22.04, the full list of things I did was:

sudo apt install nodejs npm 
sudo npm install --global npm
cd $HOME/.pulsar/packages/hydrogen-2.16.5/
npx electron-rebuild -v 12.2.3

humanplayer2 avatar Feb 25 '23 07:02 humanplayer2

In case this is of any importance, I had the same issue on Windows and this solved the problem there too!

rchaklashiya avatar Feb 25 '23 22:02 rchaklashiya

Technically, this is still a bug - Pulsar should be able to do these steps for you.

I'm going to reopen this, until we 100% fix it one could use this workaround

mauricioszabo avatar Feb 27 '23 00:02 mauricioszabo

Technically, this is still a bug - Pulsar should be able to do these steps for you.

Yeah, that's fair. After this discussion I wondered why this wasn't happening automatically, because surely any native module would need to be compiled for the given platform and Electron version if a package author added it as a dependency. But I don't know anything about the machinery of how that happens.

savetheclocktower avatar Feb 27 '23 00:02 savetheclocktower

I answered you on Reddit, but for posterity, the fix is this:

cd ~/.pulsar/packages/hydrogen  # or the equivalent on windows
npx electron-rebuild -v 12.2.3

Then relaunch Pulsar or run Window: Reload.

If this fixes it for you, let me know, and we can close this bug.

i love you long time.

shr00mie avatar Mar 08 '23 22:03 shr00mie

I have been sitting here using atom + hydrogen past the sunset, waiting and hoping for something like this to come along. You guys are the reason why open source is awesome.

chriskuchar avatar Apr 03 '23 20:04 chriskuchar

I answered you on Reddit, but for posterity, the fix is this:

cd ~/.pulsar/packages/hydrogen  # or the equivalent on windows
npx electron-rebuild -v 12.2.3

Then relaunch Pulsar or run Window: Reload.

If this fixes it for you, let me know, and we can close this bug.

this worked today on OSX 13.3.1 also resolving this issue for me: https://github.com/Spiker985/x-terminal-reloaded/issues/27

Thank you so much

Lithobius avatar May 08 '23 18:05 Lithobius

Wondering if I can get some input. When I execute:

cd ~/.pulsar/packages/hydrogen
npx electron-rebuild -v 12.2.3

I get:

An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild '/user/reth/.pulsar/packages/hydrogen/node_modules/zeromq'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

Error: `make` failed with exit code: 2

Anyone knows how to continue?

ReneTC avatar May 26 '23 12:05 ReneTC

I'd follow the directions and run

DEBUG=electron-rebuild npx electron-rebuild -v 12.2.3

and see if it produces any useful output.

savetheclocktower avatar May 26 '23 17:05 savetheclocktower

Thanks. I haven't been able to resolve this yet. Any ideas are welcome:

>>> sudo DEBUG=electron-rebuild npx electron-rebuild -v 12.2.3
Error: node-gyp failed to rebuild '/user/reth/.pulsar/packages/hydrogen/node_modules/zeromq'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

Error: `make` failed with exit code: 2


    at NodeGyp.rebuildModule (/root/.npm/_npx/c78fbb4f3949be78/node_modules/electron-rebuild/lib/src/module-type/node-gyp.js:120:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ModuleRebuilder.rebuildNodeGypModule (/root/.npm/_npx/c78fbb4f3949be78/node_modules/electron-rebuild/lib/src/module-rebuilder.js:98:9)
    at async ModuleRebuilder.rebuild (/root/.npm/_npx/c78fbb4f3949be78/node_modules/electron-rebuild/lib/src/module-rebuilder.js:128:14)
    at async Rebuilder.rebuildModuleAt (/root/.npm/_npx/c78fbb4f3949be78/node_modules/electron-rebuild/lib/src/rebuild.js:149:13)
    at async Rebuilder.rebuild (/root/.npm/_npx/c78fbb4f3949be78/node_modules/electron-rebuild/lib/src/rebuild.js:112:17)
    at async /root/.npm/_npx/c78fbb4f3949be78/node_modules/electron-rebuild/lib/src/cli.js:158:9

ReneTC avatar May 30 '23 07:05 ReneTC

Finally got Hydrogen to install on Pulsar 1.112.1 in my Linux machine after more than a year stuck on Atom :sob: In my case, I had to cd ~/.pulsar/packages/Hydrogen/ (with a capital H), and then run the electron-rebuild command. This blog post has step by step instructions - https://pipegalera.com/posts/pulsar-hydrogen which might be clearer to follow.

weiji14 avatar Jan 09 '24 21:01 weiji14