-
-
Notifications
You must be signed in to change notification settings - Fork 813
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
nw:cannot find module #534
Comments
I find in /node_modules/sqlite3/lib/binding there is a floader named "node-webkit-v0.8.6-linux-x86" which i suggest generated by nw-gyp .but why nw try to find binding/node-v11-linux-x64 rather than binding/node-webkit-v0.8.6-linux-x86 |
Since the module appears in the correct path for the build options you supplied, you've probably built the native module correctly. I assume from the build options that you are trying to run this on 32-bit nw-js. Since If |
Having same issue. If I manually linked the compiled .node into a path that the error indicates it is expected at, things work fine. Recap: I compiled sqlite3 for nwjs-v0.12.3-linux-x64 on ubuntu 14 lts. Installed with: When running
It shows that it is expecting. While this work around allows me to continue development it breaks any package/installation/sharing possibilities. |
I get exactly the same with using the Electron framework in place of NW/node-webkit, when using the electron official recommendations for installing modules. same solution |
The path gets built like so:
So you likely want to check I think I see an issue with Electron. You can pass it in as the Edit: Apparently there are at least two pull requests (1, 2) to fix the issue with Electron that have been sitting there for more than 2-3 months. |
Thanks for the links and clear trail. I wonder why they chose to have this setup. The few other native modules my application uses include their ".node" via a static unparameterised path. And they compile and work fine between nw/electron and node. |
…ather than a db. mapbox sqlite3 module has issues in nw or eletron frameworks, which I am slowly working snifferjs into. the problem is discussed: TryGhost/node-sqlite3#534 (comment)
vrcraze@vrcraze-virtual-machine:/media/vrcraze/MyFiles/work_banch/nexe$ ~/Downloads/node-webkit-v0.8.6-linux-x64/nw .
module.js:343
throw err;
^
Error: Cannot find module '/media/vrcraze/MyFiles/work_banch/nexe/node_modules/sqlite3/lib/binding/node-v11-linux-x64/node_sqlite3.node'
at Function.Module._resolveFilename (module.js:341:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:367:17)
at require (module.js:383:17)
at Object.eval (/media/vrcraze/MyFiles/work_banch/nexe/node_modules/sqlite3/lib/sqlite3.js:4:15)
at Module._compile (module.js:459:26)
at Object.Module._extensions..js (module.js:477:10)
at Module.load (module.js:359:32)
at Function.Module._load (module.js:315:12)
at Module.require (module.js:367:17)
node v0.10.26
ubuntu 14.06 x64
nw v0.8.6
sqlite3 v3.0.8 and i install sqlite3 use
sudo npm install sqlite3@3.0.8 --build-from-source --runtime=node-webkit --target_arch=x86 --target=0.8.6
and without error.but when i use nw.js to run my app
~/Downloads/node-webkit-v0.8.6-linux-x64/nw .
errors above fuck me.what can i do then? THX!
The text was updated successfully, but these errors were encountered: