Skip to content

Yarn berry (Yarn 2.x) support #2535

Closed
Closed

Description

@TheColdPot

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

When I trying to use yarn berry to run electron forge, it says

PackageNotFoundError: Cannot find the package "electron". Perhaps you need to run "yarn install" in "D:\program\datapack-planet"?

I already run yarn install, it's not work

Proposed solution

Use other ways instead find directory in node_modules to find electron package.

Alternatives considered

run start webpack server and electron directly.

Additional information

No response

Activity

  1. MarshallOfSound commented on Feb 3, 2022

    @MarshallOfSound
    Member

    Electron itself doesn't support yarn v2 (berry), use the original yarn v1 which works correctly instead of the v2 version which does non standard and unsupported things

  2. Ivan-Parushev commented on May 14, 2023

    @Ivan-Parushev

    I don't understand why this issue has been closed. Yarn's PnP feature isn't going anywhere anytime soon. It is now one of the best ways to start a new nodejs project. Are there any fundamental technical issues with the support? What needs to be done?

  3. RoyRao2333 commented on Sep 20, 2023

    @RoyRao2333

    I'm getting electron@npm:26.2.1 couldn't be built successfully (exit code 1 when yarn install using Yarn 3.6.3. Maybe this is the same issue as this one?

    I'd like to use Yarn Berry instead of Yarn v1 very much. Please fix this.

  4. naruto00fa commented on Oct 20, 2023

    @naruto00fa

    At least should put notes in official document Getting Started about creating app with Yarn, you have Yarn scripts, but they don't work with the latest version. It took me a long time to find here.

    And forge not support even not plan to support ESModules, these 2 decisions are disappointing.

  5. erickzhao commented on Oct 20, 2023

    @erickzhao
    Member

    There's an active PR (#3358) to add ESM forge.config.js support.

  6. erickzhao commented on Oct 21, 2023

    @erickzhao
    Member

    Thanks for the suggestion though @naruto00fa, see electron-forge/electron-forge-docs@2e82937 for clarification note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions