uber / react-vis

Data Visualization Components

Home Page:https://uber.github.io/react-vis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't install on React 17 create-react-app project

karamvirsingh98 opened this issue · comments

Hi,

As the title says, npm won't install react-vis on a create-react-app project with React 17.

Here's the console error log:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: react-vis@0.1.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"15.3.0 - 16.x" from react-vis@1.11.7
npm ERR! node_modules/react-vis
npm ERR! react-vis@"1.11.7" 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.

And here's the full error report:

npm resolution error report

2021-06-07T00:12:00.289Z

While resolving: react-vis@0.1.0
Found: react@17.0.2
node_modules/react
react@"^17.0.2" from the root project

Could not resolve dependency:
peer react@"15.3.0 - 16.x" from react-vis@1.11.7
node_modules/react-vis
react-vis@"1.11.7" 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.2",
"whileInstalling": {
"name": "react-vis",
"version": "0.1.0",
"path": "/Users/karamvirsingh/GitHub/react-vis"
},
"location": "node_modules/react",
"dependents": [
{
"type": "prod",
"name": "react",
"spec": "^17.0.2",
"from": {
"location": "/Users/karamvirsingh/GitHub/react-vis"
}
}
]
},
"edge": {
"type": "peer",
"name": "react",
"spec": "15.3.0 - 16.x",
"error": "INVALID",
"from": {
"name": "react-vis",
"version": "1.11.7",
"whileInstalling": {
"name": "react-vis",
"version": "0.1.0",
"path": "/Users/karamvirsingh/GitHub/react-vis"
},
"location": "node_modules/react-vis",
"dependents": [
{
"type": "prod",
"name": "react-vis",
"spec": "1.11.7",
"from": {
"location": "/Users/karamvirsingh/GitHub/react-vis"
}
}
]
}
},
"peerConflict": null,
"strictPeerDeps": false,
"force": false
}

It's working fine with React 17 (although react-vis was not updated to declare so), it's npm 7 stupid change that doesn't let you install it. Try installing package with --legacy-peer-deps flag.

Works like a charm, thank you!