Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Module parse failed

オープン
#797 コメント 4 件 リアクション 5 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
typescript
領域
frontend

調査の方向性

まず、tanstack-virtual ^3.9.0 と TypeScript ^4.7.4 を使用して useVirtualizer() を再現し、次に node_modules/@tanstack/virtual-core/dist/esm/index.js の254行目付近と Babel loader の設定を調査します。コンシューマーのビルドでモジュールがパースされ、追加の loader を必要とせずに useVirtualizer() が動作すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
TypeScript
スター
7.1k
フォーク
466
平均マージ
2日 31分
マージ済み PR(30日)
13

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TanStack/virtual のほかの issue

TanStack/virtual の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。