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

Support pnpm modules #1213

Open
lenchvolodymyr opened this issue Jan 27, 2021 · 8 comments
Open

Support pnpm modules #1213

lenchvolodymyr opened this issue Jan 27, 2021 · 8 comments
Labels
blocked 🚫 Depends on another issue either in this project or a dependency's project enhancement Feature request

Comments

@lenchvolodymyr
Copy link

Preflight Checklist

  • [x ] I have read the contribution documentation for this project.
  • [ x] I agree to follow the code of conduct that this project follows, as appropriate.
  • [ x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem Description

When modules installed with pnpm the pruning leads to an error like this:

Error: Failed to locate module "@azure/abort-controller" from "/home/volodymyr/projects/hackolade_pnpm/node_modules/@azure/storage-file-datalake"

        This normally means that either you have deleted this package already somehow (check your ignore settings if using electron-packager).  Or your module installation failed.

It happens because pnpm stores modules under .pnpm folder and creates symlinks only for modules in "dependencies" and "devDependencies", and probably electron-packager cannot find them.

Proposed Solution

Fix the searching of modules under the symlinks and preserve node_modules that symlinks are linked to.

Additional Information

Actually, I found the PR that fixes looking to symlinks:
MarshallOfSound/flora-colossus#16

But it doesn't preserve the origin folders, so after the packaging, it leads to broken symlinks in the node_modules folder.

So I'm wondering is there a plan to support pnpm modules structure for electron projects?

@lenchvolodymyr lenchvolodymyr added the enhancement Feature request label Jan 27, 2021
@welcome
Copy link

welcome bot commented Jan 27, 2021

👋 Thanks for opening your first issue here! If you have a question about using Electron Packager, read the support docs. If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@malept malept added the blocked 🚫 Depends on another issue either in this project or a dependency's project label Jan 27, 2021
@plimeor
Copy link

plimeor commented Oct 11, 2021

Any updates?

@mika76
Copy link

mika76 commented Dec 7, 2021

Also interested in this. I don't suppose there's any news?

Note: It seems to work if you use the shamefully-hoist option of pnpm: https://pnpm.io/npmrc#shamefully-hoist

@davej
Copy link

davej commented Dec 10, 2021

@mika76 I haven't got it working with the shamefully-hoist option. Do you have more detail?

@BlackHole1
Copy link
Member

@mika76 I haven't got it working with the shamefully-hoist option. Do you have more detail?

electron-userland/electron-builder#6289 (comment)

@GitMurf
Copy link

GitMurf commented Aug 30, 2023

Was there ever official resolution to this? Or is the solution still to use shamefully-hoist / node-linker hoisting? Thanks!

@StevenEWright
Copy link

develar/app-builder#84 (comment)

Looks like a solution was committed and is just awaiting a new release of app-builder?

@kiprobinson
Copy link

develar/app-builder#84 (comment)

Looks like a solution was committed and is just awaiting a new release of app-builder?

I'm still seeing this issue on Windows and MacOS... any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked 🚫 Depends on another issue either in this project or a dependency's project enhancement Feature request
Projects
None yet
Development

No branches or pull requests

9 participants