material-ui-currency-textfield icon indicating copy to clipboard operation
material-ui-currency-textfield copied to clipboard

Enable this to work with react v 17+

Open cowley05 opened this issue 3 years ago • 2 comments

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.

cowley05 avatar Feb 21 '23 15:02 cowley05

yes, i have same error and i rlly need this. fix

Alexie81 avatar Apr 22 '23 18:04 Alexie81

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"
    }
  }

IvarK avatar Dec 13 '23 12:12 IvarK