[Bug] Uncaught ReferenceError: _define_property is not defined

Aperta
#2,569 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
react, typescript
Ambito
frontend, web-dev

Direzione di ricerca

Inizia con il file sandbox.zip allegato e riproduci il ReferenceError del browser passando da maplibre-gl 5.11.0 a 5.12.0 o 5.13.0. Confronta il comportamento del pacchetto e l’output del browser; il lavoro è completo quando la mappa viene visualizzata senza l’errore _define_property nelle versioni più recenti, oppure quando l’incompatibilità è chiaramente isolata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
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
Image
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
Image

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

sandbox.zip

Environment

Framework version: [email protected]
Map library: [email protected]
Browser: Chrome 142.0.7444.176
OS: Windows 11 25H2 26200.7171

Logs

No response

Lingua principale
TypeScript
Stelle
8.5k
Fork
1.3k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di visgl/react-map-gl

Tutte le issue di visgl/react-map-gl

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.