[Bug] Uncaught ReferenceError: _define_property is not defined
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- react, typescript
调研方向
从附加的 sandbox.zip 开始,在 maplibre-gl 5.11.0 与 5.12.0 或 5.13.0 之间切换,以复现浏览器 ReferenceError。比较 package 的行为和浏览器输出;当地图在较新版本中能够渲染且不再出现 _define_property 错误,或已明确定位不兼容性时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Description
Bit of an odd one that I can't quite figure out. react-map-gl has a peer dependency on maplibre-gl. If I end up with a upgrade of maplibre-gl from 5.11.0 to 5.12.0 (or 5.13.0) I get an error in the browser console, and the map doesn't render:
Browser console:
dbf3e5f8-162b-4b7e-8…-d8d408c9388f:17308 Uncaught ReferenceError: _define_property is not defined
at dbf3e5f8-162b-4b7e-8…8d408c9388f:17308:9
at dbf3e5f8-162b-4b7e-8…8d408c9388f:19735:7
Not working with maplibre-gl 5.12.0
mat@devbox:~/dev/sandbox$ pnpm add [email protected]
Already up to date
Progress: resolved 299, reused 228, downloaded 0, added 0, done
Done in 1.9s using pnpm v10.23.0
mat@devbox:~/dev/sandbox$ pnpm why maplibre-gl
Legend: production dependency, optional only, dev only
[email protected] /home/mat/dev/sandbox (PRIVATE)
dependencies:
maplibre-gl 5.12.0
react-map-gl 8.1.0
├─┬ @vis.gl/react-maplibre 8.1.0
│ └── maplibre-gl 5.12.0 peer
└── maplibre-gl 5.12.0 peer
Working okay with maplibre-gl 5.11.0
mat@devbox:~/dev/sandbox$ pnpm add [email protected]
Packages: +3 -4
+++----
Progress: resolved 298, reused 227, downloaded 0, added 0, done
dependencies:
- maplibre-gl 5.12.0
+ maplibre-gl 5.11.0 (5.13.0 is available)
Done in 3s using pnpm v10.23.0
mat@devbox:~/dev/sandbox$ pnpm why maplibre-gl
Legend: production dependency, optional only, dev only
[email protected] /home/mat/dev/sandbox (PRIVATE)
dependencies:
react-map-gl 8.1.0
├─┬ @vis.gl/react-maplibre 8.1.0
│ └── maplibre-gl 5.11.0 peer
└── maplibre-gl 5.11.0 peer
I guess it's a maplibre-gl problem, but I'm using it from react-map-gl and getting confused. Am I doing anything stupid in the attached sandbox?
Expected Behaviour
Works the same between [email protected] and [email protected] (or 5.13.0)
Steps to Reproduce
Environment
Framework version: [email protected]
Map library: [email protected]
Browser: Chrome 142.0.7444.176
OS: Windows 11 25H2 26200.7171
Logs
No response
- 主要语言
- TypeScript
- 星标
- 8.5k
- 派生
- 1.3k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
visgl/react-map-gl#2591 · 2 条评论 ·
-
[Bug] Mapbox geocoder example crashes: "i is not a function"可能已有人在做 @yuiseki 于 20 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
visgl/react-map-gl#2628 ·
-
[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 一周以上 新手友好度 42/100
visgl/react-map-gl#2603 · 1 个 reaction ·
查看 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 天内回复