Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility issue with latest pnpm version 8.0.0 #11208

Closed
Demir-Utku opened this issue Mar 28, 2023 · 2 comments · Fixed by #11209
Closed

Incompatibility issue with latest pnpm version 8.0.0 #11208

Demir-Utku opened this issue Mar 28, 2023 · 2 comments · Fixed by #11209

Comments

@Demir-Utku
Copy link
Contributor

Demir-Utku commented Mar 28, 2023

Expected behavior

Expecting to work this library with the latest pnpm version, which is 8.0.0.

Current behavior

When I want to install chart.js@4.2.1 with pnpm@8.0.0, 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": "pnpm@7.9.0", // 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

@etimberg
Copy link
Member

Happy to review a PR for the suggested solution

@Demir-Utku
Copy link
Contributor Author

I'll open a PR, then. Thanks!

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

Successfully merging a pull request may close this issue.

2 participants