Support React 19
Describe the issue and the actual behavior
When upgrading next js to version 15 I get the following warnings after running their upgrade codemod
react-number-format 5.4.2
├── ✕ unmet peer react@"^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0": found 19.0.0
└── ✕ unmet peer react-dom@"^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0": found 19.0.0
Describe the expected behavior
React 19 should be listed as peer deps
npm ERR! Found: [email protected] npm ERR! node_modules/react npm ERR! react@"^19.0.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" from re npm ERR! node_modules/react-number-format npm ERR! react-number-format@"*" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
this!
I'm also interested in making it compatible with React 19 to enable migration. It's the only dependency left to migrate.
PR in progress https://github.com/s-yadav/react-number-format/pull/871
react & react-dom are now at 19.1, which appears to require another update.
I think this can be closed, that PR was merged and was part of this release https://github.com/s-yadav/react-number-format/releases/tag/v5.4.3.
react & react-dom are now at 19.1, which appears to require another update.
The added version is "^19.0.0" which includes 19.1.x.
@dantman thanks for the heads up!
It's not working with react 19.1.0
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error react@"19.1.0" from the root project
npm error peer react@"^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" from [email protected]
npm error node_modules/react-number-format
npm error react-number-format@"5.4.4" from the root project
It's not working with react 19.1.0
npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: [email protected] npm error Found: [email protected] npm error node_modules/react npm error react@"19.1.0" from the root project npm error peer react@"^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" from [email protected] npm error node_modules/react-number-format npm error react-number-format@"5.4.4" from the root project
Having the same issue with React 19.1.0.. Did you manage to find a solution?
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error react@"19.1.0" from the root project
npm error peer react@"^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" from [email protected]
npm error node_modules/react-number-format
npm error react-number-format@"*" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^19.2.0" from [email protected]
npm error node_modules/react-dom
npm error peer react-dom@"^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" from [email protected]
npm error node_modules/react-number-format
npm error react-number-format@"*" from the root project
It's not working with react 19.1.0
npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: [email protected] npm error Found: [email protected] npm error node_modules/react npm error react@"19.1.0" from the root project npm error peer react@"^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" from [email protected] npm error node_modules/react-number-format npm error react-number-format@"5.4.4" from the root projectHaving the same issue with React 19.1.0.. Did you manage to find a solution?
npm error While resolving: [email protected] npm error Found: [email protected] npm error node_modules/react npm error react@"19.1.0" from the root project npm error peer react@"^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" from [email protected] npm error node_modules/react-number-format npm error react-number-format@"*" from the root project npm error npm error Could not resolve dependency: npm error peer react@"^19.2.0" from [email protected] npm error node_modules/react-dom npm error peer react-dom@"^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" from [email protected] npm error node_modules/react-number-format npm error react-number-format@"*" from the root project
I got it working, but to be frank I don't remember how... I think what I did was to install react-dom 19.1.0 This is my current versions: "react": "^19.1.0", "react-dom": "^19.1.0", "react-native": "0.81.4", "react-number-format": "^5.4.4",