Repository navigation
Support pnpm #2633
Description
Activity
any ETA?
Not only import but also the packaging is not working. This is needed to be fixed. It's impossible to use in Monorepos for now :(
Reacted by Elon Tang, eden lane, Nate Moore, David Goitia, 刘自强, Viktor Shchelochkov , Ymir, JonyLin and PhilTry the solution from electron-builder: https://www.electron.build/index.html#note-for-pnpm
My .npmrc file in the project root looks so:
node-linker=hoisted public-hoist-pattern=*Reacted by Grimmer Kang, Dan Michael O. Heggø, South Drifter, hang_dai, ggfong, Alexander Cerutti, Sebastián Balay, Billy and Calum SieppertReacted by Thepbordin and Alexander CeruttiI will investigate this issue in the next few days and would prioritize investigating: whether forge can work with
pnpmhoist. electron-userland/electron-builder#6289 (comment)If we need to get forge to actually support pnpm, it's technically possible to do so, it's just going to take a lot of time. I don't want to provide an approximate completion time for this, but I will raise its priority. 😃
This isn't just a case of supporting
pnpmwith hoist enabled in this repository, several core dependencies do package traversal. The key ones being:Galactus depends on flora-colossus so if support is added correctly in the former galactus may Just Work™️
Then there's the stuff in this repository, most of which I believe is tied into the
yarn-or-npmhelper and routed into various helpers throughout the codebaseReacted by Erick Zhao and Bartosz GościńskiThere's two aspects for pnpm support.
- Getting electron forge CLI working with it
- Getting electron packager working with it
Sounds like (1) can be resolved if flora-colossus is fixed, can you confirm @MarshallOfSound? Could there be an alternate library we can move to that uses the standard node resolution algorithm (as that should just work, no?).
For (2) - that's more tricky but considering it doesn't even support npm workspaces by default we have more problems. I'd say considering it has a workaround (implementing your own packageAfterCopy with prune: false) you could do the same for pnpm.
Is there any appetite from the core Electron team to look at both pnpm + workspace (for any package manger) support?
Reacted by MicaReacted by Kenneth PirmanI think @BlackHole1 (who is also a pnpm maintainer) was investigating this issue. Not sure where we ended up!
Reacted by Leo Wang(草鞋没号) and RoyThank you for the reminder, @erickzhao! I apologize for delaying this task 🙇♂️. Recently, I've been putting my energy into entrepreneurship-related matters and haven't had any extra time to investigate this task, leading me to forget about it 🫨. I will complete my current work as soon as possible to have additional time to conduct the investigation.
Reacted by Jonas Kugelmann, Erick Zhao, 鹿俊, Hermit, XTY, Bartosz Gościński, Charles Esterbrook, Roy, Mohammad Jafarinejad and hashiccwhat is missing here?
We currently have an open PR attached to this issue @sibelius! If you have any input to give as a pnpm user, would be appreciated.
Reacted by Sibelius Seraphini, Roy and Nate Moore@erickzhao Which PR is it? What needs to be done still on it?
13 remaining items
am waiting for.......
Reacted by rtritto, Robert Hurst, bibibala, haakonjackfloat, Ding Yi and PaulHas anyone tried uninstalling
yarnglobally? https://stackoverflow.com/questions/72201239/pnpm-install-usage-error-this-project-is-configured-to-use-yarn/78518215#78518215Has anyone tried uninstalling
yarnglobally? https://stackoverflow.com/questions/72201239/pnpm-install-usage-error-this-project-is-configured-to-use-yarn/78518215#78518215i'm here with ya'll!
Reacted by Yueyanc, 邓超, Poomipat, Charles and Roy- marked Error: ENOENT, [email protected] not found in app.asar #3453 as a duplicate of this issue
on Jan 31, 2025 OMFG. I'm forced to use NPM? Fuck no! Why is this not being addressed? Why are we stuck with fucking NPM? Why can't we just stop using crap tools? Why do we have to fight with the tooling instead of spending time building shit? 5 years and nothing? Node.js ecosystem is a fucking joke.
You have so many solutions in JS ecosystem, but all of them are crap. When are we going to move past this?
Reacted by Andrey (Andrii) Los and HenriSo the PR #3822 will add the support of PnP for pnpm and yarn?
No, that's why I said specifically pnpm. Being honest, I don't really know about Forge's support for Yarn PnP, I don't use Yarn and this issue is about PNPM. I'd spend some time reading the PR anyway or maybe ask a maintainer what the plans are for Yarn PnP specifically.
From the PR description:
This PR aims to provide a basic level of [pnpm](https://pnpm.io/) support for Electron Forge.Reacted by rtritto
Pre-flight checklist
Problem description
Using pnpm does not seem to work with electron-forge. An error is thrown when executing
pnpx electron-forge importand I do not see any mention of pnpm in the repository and docs.It would be nice if it worked as pnpm is becoming more and more popular.
Proposed solution
Allow pnpm to work and show working in docs along npm and yarn.
Alternatives considered
npm and yarn
Additional information
No response