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.
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 ofdevEngineswhich 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 installin node v22, it created a package-lock.json file.npm packcreated a tarball which seemed to work as expected. However, when I rannpm run test:unitI got errors. It worked when I deletednode_modulesand rannpm install --global --include=dev pnpm@10.28.2; pnpm install.