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

Can't start after exe package #4

Open
phcmaia opened this issue Aug 3, 2019 · 7 comments
Open

Can't start after exe package #4

phcmaia opened this issue Aug 3, 2019 · 7 comments

Comments

@phcmaia
Copy link

phcmaia commented Aug 3, 2019

Hello ,
Installtion works and if i run with node also works , but when package into an EXE with nexe or pkg gives the following :

Error: Module did not self-register.
at Object.Module._extensions..node (module.js:680:18)
at Module.load (module.js:564:32)
at tryModuleLoad (module.js:504:12)
at Function.Module._load (module.js:496:3)
at Module.require (module.js:595:17)
at Module.require (pkg/prelude/bootstrap.js:1166:31)
at require (internal/module.js:11:18)
at initNode (C:\snapshot\test\node_modules\nbind\dist\nbind.js:141:15)
at C:\snapshot\test\node_modules\nbind\dist\nbind.js:115:13
at findCompiledModule (C:\snapshot\test\node_modules\nbind\dist\nbind.js:79:13)

Can you help ?
Thanks ,

@msvargas
Copy link

You copy .node file dependecies of package in .exe folder?

@YeapGuy
Copy link

YeapGuy commented Oct 14, 2020

I've searched for a solution for this for multiple hours and finally found it (here), so I thought I'd share it with you. For unknown reasons, it's only going to work when the packaged file is named node.exe. I'll continue to search for a workaround or a fix to this package so it works with .exe files named other than node.exe.

@mceIdo
Copy link
Contributor

mceIdo commented Jan 5, 2021

A re-write was done dropping nbind and adopting N-API, which turns this into a pretty standard module - can someone confirm if this is still an issue with v3.0.0?

@YeapGuy
Copy link

YeapGuy commented Jan 6, 2021

@mceIdo Nope, now I get a different error (yay?):
Error: A dynamic link library (DLL) initialization routine failed.

@YeapGuy
Copy link

YeapGuy commented Jan 6, 2021

And again, this only happens with a different filename than "node". Naming the file node.exe and then running it works.

@YeapGuy
Copy link

YeapGuy commented Jan 6, 2021

And also. I found a workaround for this issue some time ago, just forgot to put it here:
Use rid.exe on the .node file found in \node_modules\windows-trayicon\build\Release\addon.node. Example: rid.exe addon.node node.exe yourfilename.exe. That does the trick.

@alcor93
Copy link

alcor93 commented Jan 18, 2021

hello,
can you please explain more how to solve the issue with pkg. It's not clear for me. thanks

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

No branches or pull requests

5 participants