Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Module parse failed

Đang mở
#797 4 bình luận 5 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện useVirtualizer() với tanstack-virtual ^3.9.0 và TypeScript ^4.7.4, sau đó kiểm tra node_modules/@tanstack/virtual-core/dist/esm/index.js quanh dòng 254 và cấu hình Babel loader. Công việc được xem là hoàn tất khi bản build của consumer phân tích được module và useVirtualizer() hoạt động mà không cần thêm loader.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
TypeScript
Star
7.1k
Fork
466
Merge trung bình
2 ngày 31 phút
Pull request đã merge (30 ngày)
13

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TanStack/virtual

Tất cả issue của TanStack/virtual

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.