You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to update to React 18 I get this kind of errors of all react-vis components:
error TS2786: 'FlexibleWidthXYPlot' cannot be used as a JSX component.
Its type 'typeof FlexibleWidthXYPlot' is not a valid JSX element type.
Note:
React-vis with React 17 works with fine even with newest ("17.0.80") "@types/react", if you don't get different versions of React by some other dependency.
We needed to add this manual (yarn) resolve:
"resolutions": {
"@types/react": "17.0.80"
}
Reacted by Nic Willemse, mihaigeorgech, Collin Klopfenstein, Spielcrypto, Genaro Camele, Stacey Terman and Daniel Sousa
@collink Are you encountering an error indicating a peer dependency version conflict? The package react-vis requires a React version from 15.0.0 to 16.x, which is incompatible with the React version 18.0.0 installed in your project.
To work around this, try running the command npm install react-vis@1.11.12 --legacy-peer-deps. The --legacy-peer-deps flag allows you to bypass peer dependency conflicts.
I suggest using react-vis@1.11.12 since the latest version has some issues with component rendering (#1482). I'll investigate this further. Meanwhile, this should help!
I have the same issue with RadialChart 'RadialChart' cannot be used as a JSX component. even with version 1.11.12 installed with yarn. Then sad but practically I have to find another alternative that at least works
Activity
collink commentedon Jan 17, 2024
I'm not even able to install
react-visin a fresh React 18 project.thisis-Shitanshu commentedon Jan 28, 2024
@collink Are you encountering an error indicating a peer dependency version conflict? The package
react-visrequires a React version from 15.0.0 to 16.x, which is incompatible with the React version 18.0.0 installed in your project.To work around this, try running the command
npm install react-vis@1.11.12 --legacy-peer-deps. The--legacy-peer-depsflag allows you to bypass peer dependency conflicts.I suggest using
react-vis@1.11.12since the latest version has some issues with component rendering (#1482). I'll investigate this further. Meanwhile, this should help!spielcrypto commentedon Mar 26, 2024
I have the same issue with RadialChart
'RadialChart' cannot be used as a JSX component.even with version 1.11.12 installed with yarn. Then sad but practically I have to find another alternative that at least worksjkytomak commentedon Sep 9, 2024
First step would be merging this PR:
#1473