TS2786: 'VictoryAxis' cannot be used as a JSX component
TS2786: 'VictoryAxis' cannot be used as a JSX component
Current versions used, along with node v18.
"@types/react-dom": "^18.2.7", "@types/react": "18.0.2",
This can occur when switching from node 16 or lower to node 18 or more.
This is similar to this unanswered question https://github.com/FormidableLabs/victory/discussions/2632
Solution #1
Solution #2
npm install --save-dev @types/react@latest npm install --save-dev @types/react-dom@latest or
yarn add --dev @types/react@latest yarn add --dev @types/react-dom@latest
Recent Comments