-
Notifications
You must be signed in to change notification settings - Fork 264
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
Electron runtime builds to incorrect directory #189
Comments
I have exactly the same problem with the module sqlite3. |
I found the problem: in lib/util/versioning.js:252
Due to specifically
Probably some copy-paste or inadvertency, since EDIT: There's already a pull request for it: #187 |
This bug is wide-spread enough that electron-rebuild has a workaround specifically for this. And it seems to work well in my case |
please solve this |
Solved by #187 - available in node-pre-gyp >= 0.6.25 |
I'm trying to build voodootikigod/node-serialport for Electron 0.34.3 (from electron-prebuilt) on Windows using Node 4.2.2 but node-pre-gyp 0.6.15 seems to output the compiled .node file into the wrong directory.
I'm rebuilding node-serialport for Electron using
node_modules\serialport> ..\.bin\node-pre-gyp rebuild --runtime=electron --arch=ia32 --target=0.34.3 --dist-url=https://atom.io/download/atom-shell
and node-pre-gyp puts the serialport.node file intonode_modules\serialport\build\Release\electron-v0.34-win32-ia32
. But upon launching Electron it throwsMODULE_NOT_FOUND
because it's looking for serialport.node innode_modules\serialport\build\Release\node-v46-win32-ia32\serialport.node
. It runs fine after I rename the directory to the path Electron looks for.Am I doing something wrong? How are we supposed to use node-pre-gyp to build for Electron? Electron support was added in #175 but it sets the output directory to
electron-{ver}-{os}-{arch}
instead ofnode-{ver}-{os}-{arch}
which Electron seems to look for (e.g.'node-v46-win32-ia32'
for Electron 0.34.3 as above or'node-v44-win32-ia32'
for 0.30.6). What is the reason behind this? Other people (e.g. electron/rebuild#33) are also experiencing this issue and the symptoms seem to relate to #187 but merging that PR does not solve this issue.The text was updated successfully, but these errors were encountered: