Module parse failed
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 466
- Avg merge
- 2d 31m
- Merged PRs (30d)
- 13
Description
Describe the bug
./node_modules/@tanstack/virtual-core/dist/esm/index.js 254:22
Module parse failed: Unexpected token (254:22)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| startIndex,
| endIndex
> } = this.range ?? {
| startIndex: void 0,
| endIndex: void 0
Hi guys, can you help me with this problem? I already use:
"@babel/plugin-proposal-nullish-coalescing-operator"
"@babel/plugin-proposal-optional-chaining"
This error happen only when i use useVirtualizer()
Your minimal, reproducible example
Steps to reproduce
- Install the library
- Try to use useVirtualizer()
Expected behavior
It should work without problems
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
macOS
tanstack-virtual version
^3.9.0
TypeScript version
^4.7.4
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing useVirtualizer() with tanstack-virtual ^3.9.0 and TypeScript ^4.7.4, then inspect node_modules/@tanstack/virtual-core/dist/esm/index.js around line 254 and the Babel loader configuration. Done means the consumer build parses the module and useVirtualizer() works without requiring an additional loader.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100