Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appimage 9.0.2 The module '/srv/node_modules/rabin-bindings/build/Release/rabin-bindings.node' was compiled against a different Node.js version using #2260

Closed
neurosnap opened this issue Nov 2, 2017 · 11 comments
Labels

Comments

@neurosnap
Copy link

neurosnap commented Nov 2, 2017

  • Version: 19.43.4
  • Target: linux 64
Building AppImage for arch x64
Downloading appimage-9.0.2, please wait
Error: The module '/srv/node_modules/rabin-bindings/build/Release/rabin-bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 53. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (module.js:653:18)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at bindings (/srv/node_modules/bindings/bindings.js:81:44)
    at Object.<anonymous> (/srv/node_modules/rabin-bindings/index.js:1:43)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at _load_rabinBindings (/srv/node_modules/app-package-builder/out/ContentDefinedChunker.js:23:29)
    at /srv/node_modules/app-package-builder/src/ContentDefinedChunker.ts:10:19
    at Generator.next (<anonymous>)
From previous event:
    at ContentDefinedChunker.computeChunks (/srv/node_modules/app-package-builder/out/ContentDefinedChunker.js:88:11)
    at /srv/node_modules/app-package-builder/src/blockMap.ts:167:34
    at Generator.next (<anonymous>)
From previous event:
    at blocks.default.map (/srv/node_modules/app-package-builder/out/blockMap.js:150:30)
From previous event:
    at /srv/node_modules/app-package-builder/src/blockMap.ts:165:40
    at Generator.next (<anonymous>)
From previous event:
    at doComputeBlockMap (/srv/node_modules/app-package-builder/out/blockMap.js:185:22)
    at /srv/node_modules/app-package-builder/src/blockMap.ts:25:24
From previous event:
    at createDifferentialPackage (/srv/node_modules/app-package-builder/out/blockMap.js:51:21)
    at /srv/node_modules/electron-builder/src/targets/appImage.ts:118:32
    at Generator.next (<anonymous>)
From previous event:
    at AppImageTarget.build (/srv/node_modules/electron-builder/out/targets/appImage.js:193:11)
    at taskManager.addTask.default.map.it (/srv/node_modules/electron-builder/src/platformPackager.ts:120:85)
From previous event:
    at LinuxPackager.packageInDistributableFormat (/srv/node_modules/electron-builder/src/platformPackager.ts:120:41)
    at /srv/node_modules/electron-builder/src/platformPackager.ts:116:10
From previous event:
    at LinuxPackager.pack (/srv/node_modules/electron-builder/out/platformPackager.js:190:11)
    at /srv/node_modules/electron-builder/src/packager.ts:260:24
From previous event:
    at Packager.doBuild (/srv/node_modules/electron-builder/out/packager.js:332:11)
    at /srv/node_modules/electron-builder/src/packager.ts:186:52
    at Generator.next (<anonymous>)
From previous event:
    at Packager.build (/srv/node_modules/electron-builder/out/packager.js:261:11)
    at /srv/node_modules/electron-builder/src/builder.ts:283:40
    at Generator.next (<anonymous>)
From previous event:
    at build (/srv/node_modules/electron-builder/out/builder.js:63:21)
    at then (/srv/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at runCallback (timers.js:785:20)
    at tryOnImmediate (timers.js:747:5)
    at processImmediate [as _immediateCallback] (timers.js:718:5)
@hovancik
Copy link

hovancik commented Nov 3, 2017

Do you have "postinstall": "electron-builder install-app-deps",?

@neurosnap
Copy link
Author

neurosnap commented Nov 3, 2017

Yes. It looks like this binary that is being downloaded after the rebuild was built using a different node version.

@hovancik
Copy link

hovancik commented Nov 3, 2017

Had similar issues and it was problem of my config. Trying now with my project and works fine. Maybe try comparing your package.jsons with mine? Works fine for me on: https://github.com/hovancik/stretchly/tree/release/0.12.0

@WalrusSoup
Copy link

@neurosnap were you able to figure this out? Same issue on this end.

@neurosnap
Copy link
Author

neurosnap commented Nov 6, 2017 via email

@WalrusSoup
Copy link

WalrusSoup commented Nov 6, 2017

I was able to do a few things to fix it:

rm -rf node_modules/rabin-bindings/build/Release/
cd node_modules/rabin-bindings/
node-gyp rebuild
# Then back in the root project
./node_modules/.bin/electron-builder --prepackaged build/mac/[name].app/

I don't exactly know why this happened, so I ended up rolling back electron-builder to version 19.37.2 which seems to have fixed everything without needing to step into the rabin-bindings module.

Odd.

@tance77
Copy link

tance77 commented Nov 7, 2017

This issue still happens in the latest release. 19.45.2

@black-snow
Copy link
Contributor

black-snow commented Nov 13, 2017

I fail to install my boilerplate using electron-builder. It's trying to node-gyp rebuild some "rabin-bindings" and 404s on https://github.com/develar/rabin-bindings/releases/download/v1.7.3/rabin-bindings-v1.7.3-node-v59-win32-x64.tar.gz
Seems like whatever these bindings are they are missing for latest node releases. @develar

@p120ph37
Copy link
Contributor

p120ph37 commented Dec 4, 2017

The rabin dependency was added as part of commit 1dc2e49, so 19.36.0 onward exhibit this issue. (19.35.1 works)

@develar develar added the bug label Dec 5, 2017
develar added a commit to develar/electron-builder that referenced this issue Dec 5, 2017
@develar develar closed this as completed in 3bafe6b Dec 5, 2017
@develar
Copy link
Member

develar commented Dec 13, 2017

To avoid such errors in the future, we will get rid of NodeJS and this logic will reimplemented using Go.

@develar
Copy link
Member

develar commented Dec 31, 2017

I have finally get rid of NodeJS — logic implemented in Go. Enjoy reliability, performance and reduced memory usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants