Reputation: 1104
I'm using electron and one of my dependencies is using node-pre-gyp for prebuilding some node native modules.
Node-pre-gyp is not working properly with webpack, so I decided to import my library to use it as external.
Everything works fine locally, but if I try to create a package with electron-builder it's not able to find node-pre-gyp, apparently electron-build removes the node modules, so my app is not able to use it.
I tried adding it to the "files" configuration for electron builder with no luck.
Upvotes: 0
Views: 380
Reputation: 1104
I solved the issue switching from node-pre-gyp to prebuildify.
Another alternative I found is to specifically set the required dependencies in the package.json that I was using for electron, but that was something I was trying to avoid, since it was a dependency of my backend (fork spawned from the main process).
Upvotes: 0