Skip to content

npm install uses Corepack, which is no longer available in Nodejs v22 (npm run test:unit failed) #310

Description

@david-knipe395

package.json contains the field "packageManager": "pnpm@10.28.2". This is the top-level field and is a nodejs feature (not to be confused with the subfield of devEngines which is a feature of npm). It is documented as experimental at https://nodejs.org/docs/latest-v20.x/api/all.html#all_packages_packagemanager for nodejs v20, and is managed by a nodejs built-in tool called Corepack. The docs page for v22 has no mention of either package manager or corepack.

When I ran npm install in node v22, it created a package-lock.json file. npm pack created a tarball which seemed to work as expected. However, when I ran npm run test:unit I got errors. It worked when I deleted node_modules and ran npm install --global --include=dev pnpm@10.28.2; pnpm install.

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