[Bug] Mapbox geocoder example crashes: "i is not a function"
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- node.js, react, typescript, webpack
調査の方向性
Start with the website's webpack configuration and how it resolves the nested nanoid dependency used by @mapbox/mapbox-gl-geocoder. Reproduce by opening the Mapbox geocoder example at /examples/mapbox/geocoder and check whether the control renders without the reported TypeError. Done means the example loads with the geocoder control; pull request #2629 is already open against this issue.
索引モデルが issue の本文から書いたものです。
説明
Description
The Mapbox geocoder example on the website crashes on load with TypeError: i is not a function.
The error is thrown in generateSessionID() of @mapbox/[email protected], which calls require('nanoid')() and expects nanoid@2. The website's webpack config sets resolve.modules to absolute paths (from @vis.gl/docusaurus-website), so the nested nanoid@2 is skipped and the hoisted nanoid@3 is bundled. nanoid@3 has no default export.
Expected Behavior
The example renders a map with the geocoder control.
Steps to Reproduce
Open https://visgl.github.io/react-map-gl/examples/mapbox/geocoder
Environment
- Framework version: react-map-gl@8 (website, master)
- Map library: [email protected], @mapbox/[email protected]
- Browser: Chrome
- OS: macOS
Logs
TypeError: i is not a function
at generateSessionID
at onAdd
at addControl
- 主要言語
- TypeScript
- スター
- 8.5k
- フォーク
- 1.3k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
visgl/react-map-gl のほかの issue
-
DEFAULT_SETTINGS.maxBounds in @vis.gl/react-maplibre has 360° longitude span, triggers maplibre-gl-js#6148 crash via _updateSettings fallback再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
visgl/react-map-gl#2591 · コメント 2 件 ·
-
[Bug] Scroll zoom stops short of maxZoom in controlled mode with MapLibre対応中かも @sviat-barbutsa が 33 日前に担当しました。 オープンbug
難易度 3/5 半日 初心者へのやさしさ 74/100
visgl/react-map-gl#2626 ·
-
[Bug] reuseMaps: Mapbox.reuse() infinite-loops (tab freeze) when the recycled map's container is the mount container対応中かも @mikeyfarina が 82 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
visgl/react-map-gl#2613 ·
-
feature
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
visgl/react-map-gl#2603 · リアクション 1 件 ·
-
[Bug] Prop `style` does not unset properties that become `undefined`対応中かも @MohammadYusif が 140 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
visgl/react-map-gl#2595 · コメント 3 件 ·
visgl/react-map-gl の issue をすべて見る
似ている issue
-
accessibility area:ci ci-test level:low priority:high type:test
難易度 2/5 1〜3時間 初心者へのやさしさ 71/100
skytuhua-org/Gen-V1#3132 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
drmrd/vernacular#1238 ·
メンテナーはふだん 1 日以内に返信
-
question
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
enhancement migration-prioritized
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Hudson-Pufferfish/local-party-console#136 ·
メンテナーはふだん 1 日以内に返信
-
priority:medium
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信