Skip to content
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

app-builder node-dep-tree should return node_modules shape or dependency tree ? #105

Closed
fabienr opened this issue Feb 21, 2024 · 1 comment · Fixed by #118
Closed

app-builder node-dep-tree should return node_modules shape or dependency tree ? #105

fabienr opened this issue Feb 21, 2024 · 1 comment · Fixed by #118

Comments

@fabienr
Copy link
Contributor

fabienr commented Feb 21, 2024

  • App-builder Version: 3.5.10
  • Node Version: v18.19.0
  • npm Version : 10.2.3
  • Electron-Builder Version: 24.9.1

Ran into difficulties to build an electron app because npm ci hoist dependencies without making any links (looks like pnpm from what I read but did not try it myself).
app-builder node-dep-tree return a dependency tree which reflect module depends but not where they reside on the filesystem.
electron-builder use this tree to copy all depends from a project to a dist bundle asar.

One solution is to also hoist the depends thus json output match node_modules shape instead of the dependency tree.
What are your opinion, should electron-builder handle hoisted module itself or is it something all app-builder consumers need ?
Perhaps a new command node-dep-paths ?

Please find a quick diff, with this I'm able to use electron-builder. See (electron-userland/electron-builder#8068).
patch-pkg_node-modules_nodeModuleCollector_go.patch

@mmaietta
Copy link
Collaborator

mmaietta commented Mar 15, 2024

Probably would be useful for all app-builder consumers. I've put app-builder in an alpha release stage, so we could theoretically change the API since breaking changes will now be allowed for an app-builder 5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants