I am trying to use react-currency-format library in my project, but I cannot install the package. I think there is something wrong with dependencies but I couldnt figure out what is conflicting with what.
# npm resolution error report
2021-02-20T09:51:09.030Z
While resolving: x-clone@0.1.0
Found: react@17.0.1
node_modules/react
react@"^17.0.1" from the root project
Could not resolve dependency:
peer react@"^0.14 || ^15.0.0-rc || ^15.0.0 || ^16.0.0-rc || ^16.0.0" from react-currency-format@1.0.0
node_modules/react-currency-format
react-currency-format@"*" from the root project
Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
Raw JSON explanation object:
{
"code": "ERESOLVE",
"current": {
"name": "react",
"version": "17.0.1",
"whileInstalling": {
"name": "x-clone",
"version": "0.1.0",
"path": "/Users/Hamed_Iam/Desktop/x-clone"
},
"location": "node_modules/react",
"dependents": [
{
"type": "prod",
"name": "react",
"spec": "^17.0.1",
"from": {
"location": "/Users/Hamed_Iam/Desktop/x-clone"
}
}
]
},
"edge": {
"type": "peer",
"name": "react",
"spec": "^0.14 || ^15.0.0-rc || ^15.0.0 || ^16.0.0-rc || ^16.0.0",
"error": "INVALID",
"from": {
"name": "react-currency-format",
"version": "1.0.0",
"whileInstalling": {
"name": "x-clone",
"version": "0.1.0",
"path": "/Users/Hamed_Iam/Desktop/x-clone"
},
"location": "node_modules/react-currency-format",
"dependents": [
{
"type": "prod",
"name": "react-currency-format",
"spec": "*",
"from": {
"location": "/Users/Hamed_Iam/Desktop/x-clone"
}
}
]
}
},
"peerConflict": null,
"strictPeerDeps": false,
"force": false
}
I also tried npm install react-currency-format --save but it didnt work.
my npm version is 7.5.3 and node v14.15.4, I dont want to use --force. is there a fix for it?