Skip to content

Don't specify react versions - #160

Open
RichardLindhout wants to merge 1 commit into
wsmd:masterfrom
RichardLindhout:patch-1
Open

RichardLindhout wants to merge 1 commit into
wsmd:masterfrom
RichardLindhout:patch-1

Conversation

@RichardLindhout

Copy link
Copy Markdown

No description provided.

@rijk

rijk commented Oct 4, 2022

Copy link
Copy Markdown

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: my-project@0.1.0
npm ERR! Found: react@18.2.0
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 react-use-form-state@0.13.2
npm ERR! node_modules/react-use-form-state
npm ERR!   react-use-form-state@"*" from the root project

@rijk

rijk commented Oct 4, 2022

Copy link
Copy Markdown

Also reported in #158

@rijk

rijk commented Nov 9, 2022

Copy link
Copy Markdown

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

rijk commented Nov 9, 2022

Copy link
Copy Markdown

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

davidgs commented Dec 31, 2023

Copy link
Copy Markdown

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