virtual
virtual copied to clipboard
Publish v2 on NPM for React 18 Peer Dependency
Describe the bug
Currently, running npm install react-virtual on a project with React 18 fails because of unresolved peer dependency.
Duplicate of #568 to publish #278 on NPM - comment
Your minimal, reproducible example
https://tanstack.com/table/v8/docs/examples/react/virtualized-infinite-scrolling
Steps to reproduce
npm init -ynpm install react@18 react-virtual
Expected behavior
npm to resolve dependency properly
How often does this bug happen?
Always :robot:
Screenshots or Videos
knitevision1@knitevision1-laptop:~/dev/pg/qwe$ npm install react@18 react-virtual
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"18" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.6.3 || ^17.0.0" from [email protected]
npm ERR! node_modules/react-virtual
npm ERR! react-virtual@"^2.10.4" 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.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /home/knitevision1/.npm/_logs/2023-11-28T09_59_36_731Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: /home/knitevision1/.npm/_logs/2023-11-28T09_59_36_731Z-debug-0.log
Platform
Linux
tanstack-virtual version
2.10.4
TypeScript version
No response
Additional context
No response
Terms & Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
@tannerlinsley :raised_hands:
:shipit:
:crying_cat_face: :crystal_ball:
Quick fix for anyone else experiencing the issue; add this to your package.json:
"overrides": {
"react-virtual": {
"react": "^18.0.0"
}
}
Is this issue solved?
No, it is not.