useVirtualizer is not a function error after upgrading to 3.1.2
Describe the bug
We are using react-datasheet-grid (https://github.com/nick-keller/react-datasheet-grid), it is using @tanstack/react-virtual ,
We are getting below error , we see we are getting this on upgrade of @tanstack/react-virtual : 3.1.2
Grid.js:74 Uncaught TypeError: (0 , react_virtual_1.useVirtualizer) is not a function at Grid (Grid.js:74:1) at renderWithHooks (react-dom.development.js:12974:1) at mountIndeterminateComponent (react-dom.development.js:15457:1) at beginWork (react-dom.development.js:16510:1) at HTMLUnknownElement.callCallback (react-dom.development.js:3551:1) at Object.invokeGuardedCallbackDev (react-dom.development.js:3595:1) at invokeGuardedCallback (react-dom.development.js:3650:1) at beginWork$1 (react-dom.development.js:20646:1) at performUnitOfWork (react-dom.development.js:19657:1) at workLoopSync (react-dom.development.js:19602:1)
Your minimal, reproducible example
NA
Steps to reproduce
We are using react-datasheet-grid (https://github.com/nick-keller/react-datasheet-grid), it is using @tanstack/react-virtual ,
We are getting below error , we see we are getting this on upgrade of @tanstack/react-virtual : 3.1.2
Grid.js:74 Uncaught TypeError: (0 , react_virtual_1.useVirtualizer) is not a function at Grid (Grid.js:74:1) at renderWithHooks (react-dom.development.js:12974:1) at mountIndeterminateComponent (react-dom.development.js:15457:1) at beginWork (react-dom.development.js:16510:1) at HTMLUnknownElement.callCallback (react-dom.development.js:3551:1) at Object.invokeGuardedCallbackDev (react-dom.development.js:3595:1) at invokeGuardedCallback (react-dom.development.js:3650:1) at beginWork$1 (react-dom.development.js:20646:1) at performUnitOfWork (react-dom.development.js:19657:1) at workLoopSync (react-dom.development.js:19602:1)
Expected behavior
it should work as 3.0.4
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
OS : Windows Browser: Chrome
tanstack-virtual version
v3.1.2
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.
We got a similar error when running Jest and fixed it by adding the cjs file extension to transformIgnorePatterns of our jest.config.js.