Reputation: 5532
I'm building a test Electron app where I clone an express server repo, with its own node_modules
folder, into my Electron repo, also with its own node_modules
folder. The contents of my app looks like this:
main.js (starts app and forks process from the express app's index.js)
node_modules
package.json
cloned-express-app
|
--node_modules
index.js
package.json
When I package my app for Mac with electron-builder
(with or without asar enabled) the inner node_modules
directory doesn't make it into the packaged app. Is there some magic that Electron is doing to eliminate that folder? Is there some way I can ensure that it gets in?
Here are the contents of my main.js and my package.json in case that helps.
Upvotes: 2
Views: 410
Reputation: 5532
This is caused by a bug in electron-builder
that is present after version 20.15.0 and at least up to version 20.26.0. Install [email protected]
and this issue will be fixed.
Upvotes: 3