-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed
Labels
Description
Expected behavior
Expecting to work this library with the latest pnpm version, which is 8.0.0.
Current behavior
When I want to install [email protected] with [email protected], I got the following error:
ERR_PNPM_UNSUPPORTED_ENGINE Unsupported environment (bad pnpm and/or Node.js version)
Your pnpm version is incompatible with "/chart.js/4.2.1".
Expected version: ^7.0.0
Got: 8.0.0
This is happening because the package's manifest has an engines.pnpm field specified.
Reproducible sample
https://www.chartjs.org/dist/master/chart.umd.js
Optional extra steps/info to reproduce
You should first install pnpm. Then, to upgrade to the latest version of it, enter this command:
pnpm add -g pnpm
This command will upgrade your pnpm version to the latest. After trying to install chart.js with pnpm, you'll get the error.
Possible solution
Changing one/both of the below fields in package.json will probably resolve the issue:
"engines": {
"pnpm": "^7.0.0" // Change this to ">=7" to use versions that are greater than 7.
},
"packageManager": "[email protected]", // Also this one.
Context
No response
chart.js version
v4.2.1
Browser name and version
Google Chrome 111.0.5563.110
Link to your project
No response