`.node` native modules not working in packaged app
See original GitHub issueI’m getting this error in the built app
keytar.js:4Uncaught Error: Cannot find module "../build/Release/keytar.node"
However, the built keytar.node
file looks like it’s in the correct location. It seems to me that it’s not loading because of the file extension.
Works perfectly fine in the dev environment though. Any ideas on why this is happening?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Packaged app with native module fails to start due to not ...
With latest versions app fails to start because missing node modules. ... Package is created successfully but when app is started there is ......
Read more >cannot use native node module in electron-forge app
I'm currently working on a PR to fix this but in the meantime you can use ... set HOME=C:\Users\YourUser\.electron-gyp npm i npm run...
Read more >Native Node Modules | Electron
If you installed a native module and found it was not working, you need to check the following things: When in doubt, run...
Read more >Writing Native Node.js Modules - RisingStack Engineering
This article explains how native Node.js modules work, and how you can use them to increase the performance of your application.
Read more >Use Native Node Modules - NW.js Documentation
Make sure you rebuilt all native modules. Or you will meet various issues, even crashes. Once manually rebuild don't work for you, try...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I would try:
Also remember to delete the previous build directories:
This is what I always do when bindings aren’t working correctly. Let me know what the output of that is.
I think that fixed it. ❤️