-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[win] node native module doesn't work with renamed exe (was node-sqlite3 module don't work in node-webkit package mode) #199
Comments
Can you provide the exact full error message? Thanks |
happens to me too nw v.0.3.2 , node_module compiled with your nw-gyp here's my console error message
thanks in advance |
the error is in the function Module._extensions['.node'] in the module.js file in line 485 |
Hi, I try monolighter solution but i can't create a correct app.exe because when I start it node-webkit show nw:blank page. |
This could be a bug . I'll see what I can find and get back to you. -------- Original Message -------- Hi, I try monolighter solution but i can't create a correct app.exe because when I start it node-webkit show nw:blank page. Reply to this email directly or view it on GitHub: |
thank you very much |
@monolighter as specified in the wiki, the |
My wild guess is that the module DLL wants its dependency -- nw.exe, but after packaging, 'nw.exe' is renamed. |
This guess could be tested by placing |
or just name the app executable |
if I rename my app.exe in nw.exe work fine! |
can i package .dll files with nw.exe and app.zip together ? |
We are just about to integrate some custom node.js plugins and will run into this issue as well. Is there any plan to fix this in the near future? Could Gnor help with this? |
Yeah. It can be done via rebuild on windows. |
any update for this 10 months old bug? |
is this problem had been fixed ?! @lvbeck @rogerwang @theabraham |
No, I don't think so :/ |
Any planning for the fix of this error? |
Hi |
Is there any plan to fix this bug? @rogerwang |
@SingKo Since the issue is open, it's planned to be fixed. But there is no schedule yet. |
Does this problem still exist? |
Can't we just get the program name at run-time and pass it to the module after its loaded if it is really required? In Example: So for windows targets just export a hidden function like __nwmodule_init and give it the runtime information required. It should reply with the version of node webkit/ application binary interface it was compiled for then node webkit even if it is renamed could say yes or no to the module loading. Or am I misunderstanding the complexity of this issue? |
This bug is really bumming me out. |
In NW13 we are splitting the code as Chrome does on windows: ship |
that is a good idea if the same version is used on a system it will get around duplication of core functionality. Just a thought, rather than copying the nw exe each time, it may be possible to make a shell extension/registry key on windows (i am not sure about other systems) to register a file extension that would run nw.exe on the directory or package / package.json chosen. Similar to how java has jar files that can be opened in javaw by double clicking. If a particular version of nw is required the package.json could say so and some sort of loader could load that core functionality to handle the process. |
Great to hear Roger! Thanks for your hard work. |
Until we get nw.dll, maybe this can help: NW.js with a custom executable name and native modules. |
@ArielBadichi nice! will test it out! |
@SingKo |
for me it doesnt work even if I rename the resulting exe from nw-builder to nw.exe. If I put my app files in the folder where original nw lives it works. I am using leveldown in my app. |
The killer solution seems to provide a PE manipulating tool to modify import table.
You can see my demo nw-addon-demo. |
Just renamed the nw.js to myapp.exe and run the exe file, the sqlite3(native module) can't handle it. Error log: [8480:1215/172020:ERROR:gpu_child_thread.cc(146)] Exiting GPU process due to errors during initialization |
@angufix Windows reports a
for your case
Source code of |
This is supported in 0.13 now. Native modules depends on node.dll and nw.dll. And you can control the dependency. See more information here: https://groups.google.com/d/msg/nwjs-general/UqEq8ito2gI/W-ld9LSoDQAJ |
Hello guys, sorry to write on this old thread, but nw-gyp is too much for me, I'm left with no developers and trying to build myself is no use. According to the developers our application requires Uncaught Error: Cannot find module 'C:\Users\F6FAA~1.CHI\AppData\Local\Temp\nw3056_13763\node_modules\sqlite3\lib\binding\node-webkit-v0.12.3-win32-x64\node_sqlite3.node' The app has been previously built successfully on linux 64 and working correcly. After days of trying on a very steep learning curve, I'm here to ask to HIRE someone of you who would compile for windows. Please show up if available or give a few hints. the environment I used: Set python path: npm config set python /Python27/python.exe --global I removed every vs and c++ compiler from windows and installed vs express 2013 and set the environment variables. Run visual studio shell as administrator. The command I run cd build ; npm i : I tried also to build separately and in the build directory I tryed to rename nw.exe myapp.exe but still the same error You are welcome for hire to build/document or for directions Thank you |
I've a problem with node-webkit v0.3.4 and node-sqlite3 module.
So, if I run my app with command nw C:\apps\packagedapp.nw my application work fine,
but if I create a package by command copy /b nw.exe+app.nw app.exe and launch it, my application crash whit error : Uncaught error: no error myPAth/node_sqlite3.node.
someone could help me
thanks
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: