virtual icon indicating copy to clipboard operation
virtual copied to clipboard

Publish v2 on NPM for React 18 Peer Dependency

Open knitevision1 opened this issue 2 years ago • 8 comments

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 :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.

knitevision1 avatar Nov 28 '23 10:11 knitevision1

@tannerlinsley :raised_hands:

knitevision1 avatar Nov 28 '23 10:11 knitevision1

:shipit:

knitevision1 avatar Nov 28 '23 17:11 knitevision1

:crying_cat_face: :crystal_ball:

knitevision1 avatar Nov 29 '23 15:11 knitevision1

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

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

iFreilicht avatar Dec 10 '23 14:12 iFreilicht

Is this issue solved?

broisnischal avatar Dec 13 '23 10:12 broisnischal

No, it is not.

iFreilicht avatar Dec 13 '23 12:12 iFreilicht