Skip to content

Support pnpm #2633

Description

@mika76

Pre-flight checklist

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

Problem description

Using pnpm does not seem to work with electron-forge. An error is thrown when executing pnpx electron-forge import and 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

Activity

  1. renhiyama commented on Feb 4, 2022

    @renhiyama

    any ETA?

  2. RIP21 commented on Mar 21, 2022

    @RIP21

    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 :(

  3. AlexanderMac commented on Jul 5, 2022

    @AlexanderMac

    Try 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=*
    
  4. self-assigned this
    on Nov 4, 2022
  5. BlackHole1 commented on Nov 4, 2022

    @BlackHole1
    Member

    I will investigate this issue in the next few days and would prioritize investigating: whether forge can work with pnpm hoist. 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. 😃

  6. MarshallOfSound commented on Nov 4, 2022

    @MarshallOfSound
    Member

    This isn't just a case of supporting pnpm with 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-npm helper and routed into various helpers throughout the codebase

  7. itsdouges commented on May 3, 2023

    @itsdouges

    There's two aspects for pnpm support.

    1. Getting electron forge CLI working with it
    2. 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?

  8. erickzhao commented on May 3, 2023

    @erickzhao
    Member

    I think @BlackHole1 (who is also a pnpm maintainer) was investigating this issue. Not sure where we ended up!

  9. BlackHole1 commented on May 4, 2023

    @BlackHole1
    Member

    Thank 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.

  10. sibelius commented on Sep 18, 2023

    @sibelius

    what is missing here?

  11. erickzhao commented on Sep 18, 2023

    @erickzhao
    Member

    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.

  12. Everspace commented on Nov 9, 2023

    @Everspace

    @erickzhao Which PR is it? What needs to be done still on it?

  13. 13 remaining items

  14. bibibala commented on Oct 3, 2024

    @bibibala

    am waiting for.......

  15. rtritto commented on Oct 7, 2024

    @rtritto
  16. sebbean commented on Nov 23, 2024

    @sebbean

    i'm here with ya'll!

  17. babakfp commented on Feb 7, 2025

    @babakfp

    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?

  18. rtritto commented on Feb 7, 2025

    @rtritto

    @babakfp you can also use yarn (v1 or berry v4).
    If you need PnP (pnpm or yarn berry) you can wait #3209 or patch electron forge dependencies.

  19. goosewobbler commented on Feb 7, 2025

    @goosewobbler

    If you need PnP (pnpm or yarn berry) you can wait #3209 or patch electron forge dependencies.

    Actually the PR to watch for PNPM support specifically is above, #3822.

  20. rtritto commented on Feb 7, 2025

    @rtritto

    If you need PnP (pnpm or yarn berry) you can wait #3209 or patch electron forge dependencies.

    Actually the PR to watch for PNPM support specifically is above, #3822.

    So the PR #3822 will add the support of PnP for pnpm and yarn?

  21. goosewobbler commented on Feb 7, 2025

    @goosewobbler

    So 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.

  22. self-assigned this
    on Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions