Chart.js: The engine "pnpm" appears to be invalid.

Expected behavior

no warning

Current behavior

warning chart.js@4.2.1: The engine "pnpm" appears to be invalid.

image

Reproducible sample

main

Optional extra steps/info to reproduce

yarn add chart.js

Possible solution

No response

Context

When yarn Fetching packages... return warning

chart.js version

v4.2.1

Browser name and version

No response

Link to your project

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 6
  • Comments: 26 (3 by maintainers)

Most upvoted comments

Upgrading Yarn solved it for me.

yarn set version stable
yarn install

Which version of ppm are you using? Might be the same as #11208?

I use yarn, v1.22.19 in next.js project, node v16.15.0. I don’t use pnpm directly

They don’t have the warning because they don’t use pnpm then, instead they use yarn, npm or something else.

Apart from the warning it should work fine. As seen in my comment i linked yarn marked it as a no fix for V1 so you will have to keep the warning or update to yarn 2

Seems you need to use V2 of yarn, its a wont fix in yarn

https://github.com/yarnpkg/yarn/issues/7560#issuecomment-753609744

https://stackoverflow.com/questions/39732397/install-specific-branch-from-github-using-npm

This issue is fixed from a PR that was done a month ago. Why can’t you do a 0.0.1 release just to fix this bug? The issue is just changing the package.json engine from ^7.0.0 to >= 7.0.0. It’s really causing a lot of people headaches over something already fixed.

I guess that would be necessary as a manual copy-over on a production server as well then?

Would not mind an intermediate package release à la 4.2.5 or something… Would be a quick solution for this bug, as the source looks ready for it. @LeeLenaleee

This error is preventing me from being able to deploy my project to Vercel. Is there a workaround?

image

This will be fixed in V4.3.0

https://github.com/chartjs/Chart.js/pull/11209

Workaround is to install the master branch instead of a package version untill it is released https://stackoverflow.com/questions/39732397/install-specific-branch-from-github-using-npm