Skip to content

Don't specify react versions #160

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RichardLindhout
Copy link

No description provided.

@rijk
Copy link

rijk commented Oct 4, 2022

This fixes the following error when installing:

% npm i react-use-form-state
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^18.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0" from [email protected]
npm ERR! node_modules/react-use-form-state
npm ERR!   react-use-form-state@"*" from the root project

@rijk
Copy link

rijk commented Oct 4, 2022

Also reported in #158

@rijk
Copy link

rijk commented Nov 9, 2022

Is there a way to apply this patch if this package is not updated? I tried using https://www.npmjs.com/package/patch-package but it runs after install so that doesn't work.

@rijk
Copy link

rijk commented Nov 9, 2022

Found the answer: just add an overrides key to your package.json:

{
  "dependencies": {
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-use-form-state": "^0.13.2"
  },
  "overrides": {
    "react-use-form-state": {
      "react": "*",
      "react-dom": "*"
    }
  }
}

@davidgs
Copy link

davidgs commented Dec 31, 2023

Any hope of getting this fixed?

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

Successfully merging this pull request may close these issues.

3 participants