-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Module not found when packaged using Electron Forge #356
Comments
Hi @ImPhantom 👋 I had a quick look on this issue and noticed that the require(`@nut-tree/libnut-${process.platform}`); used in npm i @nut-tree/nut-js@next Thanks for reaching out! Best regards Simon |
That seems to have solved the problem completely. Thank you for the help, and for such a quick response! |
nut-tree/nut.js#356, Thank you simon!
I just logged an issue in the electron-forge repo when using their webpack template on Windows. I think the issue is related to I believe since you've already patched this, it should not be an issue from this side. But if you think it is from this side, I'll be happy to make a PR/help find the issue. |
@GaurangTandon Thanks for the heads up! 👍 |
I'm currently trying to migrate one of my projects from RobotJS to an actively maintained alternative, and found this. But I'm having trouble including this module in the packaged version of my Electron application. Everything works fine when just running the app via 'electron-forge start', but the binaries/installers produced by the package/make scripts don't seem to include NutJS at all.
Resulting in
Cannot find module '@nut-tree/libnut-win32'
I'm using the Webpack Template for Electron Forge. Which seems to handle native modules quite well. But I'm not sure whats happening here...
I'm fairly sure this isn't an issue with the actual library itself, but more a webpack/electron configuration issue that I'm just hoping someone might have some insight on. Apologies if this isn't the best place to ask this question, but I figured its better than not asking at all and pulling my hair out...
Project Source
The text was updated successfully, but these errors were encountered: