material-ui-currency-textfield
material-ui-currency-textfield copied to clipboard
Enable this to work with react v 17+
When installing this dependency using react 17 an error is produced (as below). It would be great if this could work with versions later than 16.
npm install @unicef/material-ui-currency-textfield --save
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: MY_REPO
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^17.0.2" from the root project
npm ERR! peer react@"^16.8.0 || ^17.0.0" from @material-ui/[email protected]
npm ERR! node_modules/@material-ui/core
npm ERR! peer @material-ui/core@">= 4.3.0" from @unicef/[email protected]
npm ERR! node_modules/@unicef/material-ui-currency-textfield
npm ERR! @unicef/material-ui-currency-textfield@"*" from the root project
npm ERR! 1 more (react-dom)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.6" from @unicef/[email protected]
npm ERR! node_modules/@unicef/material-ui-currency-textfield
npm ERR! @unicef/material-ui-currency-textfield@"*" 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.
yes, i have same error and i rlly need this. fix
Posted this on the other issue as well:
Adding this to package.json works for me
"overrides": {
"@unicef/material-ui-currency-textfield": {
"react": "^17.0.0",
"react-dom": "^17.0.0"
}
}