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

Package is not usable without pnpm #11424

Closed
1 task done
paulshryock opened this issue Jan 22, 2024 · 2 comments · Fixed by #11425
Closed
1 task done

Package is not usable without pnpm #11424

paulshryock opened this issue Jan 22, 2024 · 2 comments · Fixed by #11425
Assignees

Comments

@paulshryock
Copy link

Version Number

7.49.3

Codesandbox/Expo snack

x

Steps to reproduce

npm install react-hook-form

Installation fails (see error output below).

Expected behaviour

npm install react-hook-form

Package is installed.


The problem

The change that caused pnpm to become a hard dependency for this package was introduced in pull request #11163.

Keep in mind that package.json's engines key applies to end users.

The solution

Remove pnpm from package.json's engines key, so that it's no longer a hard dependency for end users.

What browsers are you seeing the problem on?

No response

Relevant log output

npm ERR! code ENOTSUP
npm ERR! notsup Unsupported engine for react-hook-form@7.49.3: wanted: {"node": ">=18","pnpm":"8"} (current: {"node":"21.6.0","npm":"10.2.4"})
npm ERR! notsup Not compatible with your version of node/npm: react-hook-form@7.49.3
npm ERR! notsup Required:  {"node":">=18","pnpm":"8"}
npm ERR! notsup Actual:    {"npm":"10.2.4","node":"21.6.0"}

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Moshyfawn Moshyfawn self-assigned this Jan 22, 2024
Moshyfawn added a commit that referenced this issue Jan 22, 2024
@Moshyfawn
Copy link
Member

Moshyfawn commented Jan 22, 2024

Curious. It shouldn't have failed as it's not set as engineStrict 🤔

@Moshyfawn Moshyfawn linked a pull request Jan 22, 2024 that will close this issue
@paulshryock
Copy link
Author

Curious. It shouldn't have failed as it's not set as engineStrict 🤔

It looks like engineStrict was removed in npm 3.x. The docs also state that unless a user has engineStrict set in their project, then only a warning is thrown. The implication is that if a user does have engineStrict set, then an error is thrown instead of a warning.

Either way, it feels like pnpm is probably just used by the package's maintainers and not by end users -- thanks for considering pulling it out from engines. I see the open pull request; that feels like the right move for end users.

Screenshot 2024-01-22 at 3 14 41 PM

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2024
rafaelcalhau pushed a commit to rafaelcalhau/react-hook-form that referenced this issue May 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants