Nested node_modules disappears after building
See original GitHub issue- Version: 20.26.0
- Target: macOS (.dmg)
Similar to https://github.com/electron-userland/electron-builder/issues/1539, I’m working with an app where I’ve cloned another git repo int and I have several node_modules
folders. When I build, the node_modules
folder in the nested git repo disappears. This happens whether asar is enabled or disabled. It also happens regardless of whether or not the inner git repo is officially designated as a git submodule or if I’ve just manually cloned it in.
Here’s my folder structure:
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
Here’s a Stack Overflow issue I just created that may explain it better (I didn’t want to copy/paste but let me know if that’s preferred) and here’s the repo I’m working with.
It’s also worth noting that I’ve tried building this for Windows and my friend said it works fine on there. I haven’t tested that recently though so I can’t give much info on that immediately. I also haven’t inspected the Resources contents of the packaged app (or whatever the .exe counterpart would be) so I can’t provide info on that but I do know that when I look in the mac app’s Resources directory there is no node_modules
folder within the nested git repo.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:16
- Comments:55 (11 by maintainers)
A new version of this patch has been pushed and I’m actively working with the project maintainers to resolve any outstanding issues.
Am I missing something here? How is this bug still not addressed? Afaict all releases post 20.15.0 are unusable and should be considered extremely dangerous, how is this not top priority? @develar ? I don’t want to be annoying, but I’ve not been able to produce a working build with any electron-builder after 20.15.0 and I’m starting to panic as you don’t even seem to acknowledge there is a problem here. And no, hn3000s explanation does not fully explain the problem, I get this error even entirely without any files excludes.
My project depends on semver@^5.6.0 A dependency I include (semvish) depends on semver@^4.6.3 electron-builder packages semver@^4.6.3 twice, in semvish/node_modules and the top-level node_modules, causing bugs in my main application, breaking electron-updater among other things. And I’ll just assume this is one problem of many caused by this.