Skip to content

packageManager field incorrect #95

@leovigna

Description

@leovigna

Describe the bug
yarn installation breaks in Node v14+ as the packageManager field is incorrect (there is no yarn v4.5.1) and starting Node v14+ node enforces the packageManager field due to the introduction of corepack. There were discussions of removing corepack from the node distribution but regardless, this incorrect field breaks on many node versions when corepack is disabled because of the yarn version mismatch (interestingly, it works when corepack is enabled).

To Reproduce

  1. Use node 14+ nvm use 14 (if node installed with nvm)
  2. corepack disable (if currently enabled)
  3. yarn
  4. Breaks with the following message
error This project's package.json defines "packageManager": "[email protected]". However the current global version of Yarn is 1.22.22.
Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.

Expected behavior
Proper installation.

Desktop (please complete the following information):

  • Linux
  • Node 14+ with corepack enabled

Solution

  • EDIT: Does NOT WORK. Unclear to me which yarn version the project uses but fix the packageManager field
  • Works: Add in README to make sure users enable corepack with corepack enable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions