Support pnpm modules
- Dominant language
- TypeScript
- Stars
- 302
- Forks
- 42
- Avg merge
- 5h 40m
- Merged PRs (30d)
- 7
Description
### Preflight Checklist
* [x ] I have read the [contribution documentation](https://github.com/electron/electron-packager/blob/master/CONTRIBUTING.md) for this project.
* [ x] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) 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](https://github.com/pnpm/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:
https://github.com/MarshallOfSound/flora-colossus/pull/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?
Contributor guide
Assessment
This issue has not been assessed yet.