Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish v2 on NPM for React 18 Peer Dependency #630

Open
2 tasks done
knitevision1 opened this issue Nov 28, 2023 · 6 comments
Open
2 tasks done

Publish v2 on NPM for React 18 Peer Dependency #630

knitevision1 opened this issue Nov 28, 2023 · 6 comments

Comments

@knitevision1
Copy link

knitevision1 commented Nov 28, 2023

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

  1. npm init -y
  2. npm install react@18 react-virtual

Expected behavior

npm to resolve dependency properly

How often does this bug happen?

Always 🤖

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: qwe@1.0.0
npm ERR! Found: react@18.2.0
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 react-virtual@2.10.4
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

  • I agree to follow this project's Code of Conduct
  • 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.
@knitevision1
Copy link
Author

@tannerlinsley 🙌

@knitevision1
Copy link
Author

:shipit:

@knitevision1
Copy link
Author

😿 🔮

@iFreilicht
Copy link

Quick fix for anyone else experiencing the issue; add this to your package.json:

  "overrides": {
    "react-virtual": {
      "react": "^18.0.0"
    }
  }

@broisnischal
Copy link

Is this issue solved?

@iFreilicht
Copy link

No, it is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants