You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this error when I try to require nodegit (version 0.4.1) in electron (version 0.28.3)
A JavaScript error occured in the browser process
Uncaught Exception:
Error: Module did not self-register.
at Error (native)
at Object.module.(anonymous function) (ATOM_SHELL_ASAR.js:137:20)
at Object.module.(anonymous function) [as .node] (ATOM_SHELL_ASAR.js:137:20)
at Module.load (module.js:351:32)
at Function.Module._load (module.js:306:12)
at Module.require (module.js:361:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/youssef/Desktop/test/node_modules/nodegit/lib/nodegit.js:8:12)
at Module._compile (module.js:426:26)
at Object.Module._extensions..js (module.js:444:10)
What's your build process? Can you walk me through how it's all built? Electron build processes are a bit odd compared to general node stuff, but I'm pretty familiar.
I'm seeing the same error. My 'npm install' appears to be building the nodegit.node binary from scratch because it can't find one for x64 linux on S3. Not sure if the nodegit.node file should be runnable, but when I try to run it I get a seg fault crash, and gdb isn't helpful on giving any more information. Any chance you can post an x64 Linux binary to S3, for Ubuntu Linux? Anything I can help with on debugging this? For now I have to revert back to 0.3.3.
My nodegit works great on Mac but that's because there's a binary out there on S3, but my custom-built binary for Linux is crashing.
I'm really sorry. The problem was that I was building a release on a build server with node 0.10, and then trying to run it on a separate server with node 0.12. Hopefully this will help anyone else that makes the same dumb mistake.
Ah, that would do it.
I'm kind of suspecting something similar with the original posted issue as well, probably needing to put atom-shell before the build, but it happened afterwards.
Yes I'm doing the build after setting the engines field. and when I copy the node_modules directory and require nodegit in a normal nodejs script I have no error
My backgound is that i just had 1 problem installing nodegit with npm, was the building of libssh2 (the file sys\iou.h couldn't be found), after some workaround using another libssh2 project, i got the complete build.
I've trying to run the app with Electron after rebuild the module with node-gyp but didn't work.
Yeah, any native module will have to be pointed at different headers to rebuild, so in general that process should work for nodegit if it works elsewhere.
lxw@lxw:16:56:29:mixJavaAndNode$ electron -v
v0.37.8
lxw@lxw:16:56:45:mixJavaAndNode$ ./node_modules/.bin/electron-rebuild -v 0.37.8
Couldn't find electron-prebuilt and no --node-module-version parameter set, always rebuildinglxw@lxw:16:57:41:mixJavaAndNode$ electron .
It just works. But I have no idea why it works at all.
Activity
johnhaley81 commentedon Jun 27, 2015
Try adding the module as
atom-shellybouhjira commentedon Jun 28, 2015
I tried and I got the same error.
maxkorp commentedon Jun 29, 2015
What's your build process? Can you walk me through how it's all built? Electron build processes are a bit odd compared to general node stuff, but I'm pretty familiar.
ybouhjira commentedon Jun 29, 2015
I just install nodegit using
npm installand it says in the output that it's compiling it. Is that enough?jhansen-tt commentedon Jul 2, 2015
I'm seeing the same error. My 'npm install' appears to be building the nodegit.node binary from scratch because it can't find one for x64 linux on S3. Not sure if the nodegit.node file should be runnable, but when I try to run it I get a seg fault crash, and gdb isn't helpful on giving any more information. Any chance you can post an x64 Linux binary to S3, for Ubuntu Linux? Anything I can help with on debugging this? For now I have to revert back to 0.3.3.
My nodegit works great on Mac but that's because there's a binary out there on S3, but my custom-built binary for Linux is crashing.
maxkorp commentedon Jul 6, 2015
Just to verify, you're doing the build AFTER setting the engines field? That only has an effect at compile time, not at build time.
The .node file should be requirable. If you try requiring it in a normal node context, does that work?
jhansen-tt commentedon Jul 6, 2015
I'm really sorry. The problem was that I was building a release on a build server with node 0.10, and then trying to run it on a separate server with node 0.12. Hopefully this will help anyone else that makes the same dumb mistake.
maxkorp commentedon Jul 6, 2015
Ah, that would do it.
I'm kind of suspecting something similar with the original posted issue as well, probably needing to put
atom-shellbefore the build, but it happened afterwards.ybouhjira commentedon Jul 6, 2015
Yes I'm doing the build after setting the engines field. and when I copy the node_modules directory and require nodegit in a normal nodejs script I have no error
No6things commentedon Jul 17, 2015
i have the same issue on windows than @ybouhjira.
My backgound is that i just had 1 problem installing nodegit with npm, was the building of libssh2 (the file sys\iou.h couldn't be found), after some workaround using another libssh2 project, i got the complete build.
I've trying to run the app with Electron after rebuild the module with node-gyp but didn't work.
I have in my package.json
No6things commentedon Jul 20, 2015
i figured out, the solution was to rebuild the module targeting different node header.
More info at
https://github.com/atom/electron/blob/master/docs/tutorial/using-native-node-modules.md
maxkorp commentedon Aug 24, 2015
Yeah, any native module will have to be pointed at different headers to rebuild, so in general that process should work for nodegit if it works elsewhere.
lxw0109 commentedon May 19, 2016
I'm a newbie. I tried the following commands.
It just works. But I have no idea why it works at all.
maxkorp commentedon Aug 18, 2016
Closing out all of these old electron-how-to issues.
RSA SHA2 256/512 key upgrade support RFC 8332 nodegit#536 (nodegit#626)
Merge pull request #1888 from julianmesa-gitkraken/fix-rsa-sha1-updat…