nextjs - 💡(How to fix) Fix Turbopack dev server drops MapLibre inline worker (react-map-gl clusters, tilelayers never render) [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#86495Fetched 2026-04-08 02:10:39
View on GitHub
Comments
3
Participants
3
Timeline
11
Reactions
0
Author
Timeline (top)
commented ×3subscribed ×3labeled ×2closed ×1

Error Message

Turbopack repeatedly prints Error: unrecognized HMR message {"event":"ping"} then hot-reloads. The error appears right when MapLibre sends the worker “ping” message used for dev HMR—Turbopack doesn’t recognize it and tears down the worker.

Code Example

<Map>
  <Source
    id="earthquakes"
    type="geojson"
    data="https://maplibre.org/maplibre-gl-js/docs/assets/earthquakes.geojson"
    cluster
    clusterMaxZoom={14}
    clusterRadius={50}
  >
    <Layer id="clusters" type="circle" source="earthquakes" filter={['has', 'point_count']} />
    <Layer id="cluster-count" type="symbol" source="earthquakes" filter={['has', 'point_count']} />
    <Layer id="unclustered" type="circle" source="earthquakes" filter={['!', ['has', 'point_count']]} />
  </Source>
</Map>

---

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.4.0: Fri Apr 11 18:33:40 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6031
  Available memory (MB): 49152
  Available CPU cores: 16
Binaries:
  Node: 24.9.0
  npm: 11.6.0
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 15.5.1-canary.20
  eslint-config-next: 15.5.1-canary.20
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.9.2
Next.js Config:
  output: standalone
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/Dendekky/react-map-gl-turbopack-issue-repro

To Reproduce

  1. Create a Next.js 15.5.1-canary project with App Router + React 19.
  2. Install [email protected] and [email protected].
  3. Render the component below anywhere in the app:
<Map>
  <Source
    id="earthquakes"
    type="geojson"
    data="https://maplibre.org/maplibre-gl-js/docs/assets/earthquakes.geojson"
    cluster
    clusterMaxZoom={14}
    clusterRadius={50}
  >
    <Layer id="clusters" type="circle" source="earthquakes" filter={['has', 'point_count']} />
    <Layer id="cluster-count" type="symbol" source="earthquakes" filter={['has', 'point_count']} />
    <Layer id="unclustered" type="circle" source="earthquakes" filter={['!', ['has', 'point_count']]} />
  </Source>
</Map>
  1. Run next dev --turbo.

Current vs. Expected behavior

Current: No data renders; the map stays empty. Turbopack repeatedly prints Error: unrecognized HMR message {"event":"ping"} then hot-reloads. No browser console errors. If you run next dev (without --turbo), or if you build and start with webpack, the map works.

Expected: react-map-gl should behave the same under Turbopack as it does under webpack (MapLibre’s worker spins up, clusters render).

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.4.0: Fri Apr 11 18:33:40 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6031
  Available memory (MB): 49152
  Available CPU cores: 16
Binaries:
  Node: 24.9.0
  npm: 11.6.0
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 15.5.1-canary.20
  eslint-config-next: 15.5.1-canary.20
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.9.2
Next.js Config:
  output: standalone

Which area(s) are affected? (Select all that apply)

Turbopack

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

The error appears right when MapLibre sends the worker “ping” message used for dev HMR—Turbopack doesn’t recognize it and tears down the worker. Removing --turbo or disabling Turbopack via TURBOPACK=0 makes the exact same code work without changes. Using next dev --turbo with Next.js 15.5.1-canary + React 19 + [email protected] (MapLibre backend) causes MapLibre’s clustering worker to never start. The same component works fine with next dev (webpack) or in production as long as transpilePackages includes maplibre-gl.

extent analysis

TL;DR

  • The issue can likely be worked around by disabling Turbopack or using a different development mode.

Guidance

  • Try running next dev without the --turbo flag to see if the issue persists.
  • Set the environment variable TURBOPACK=0 before running next dev --turbo to disable Turbopack.
  • Verify that the issue is specific to Turbopack by comparing the behavior with next dev (which uses webpack) and in production.
  • Check the transpilePackages configuration to ensure that maplibre-gl is included, as this has been reported to resolve similar issues in production.

Example

  • No specific code changes are suggested at this time, but modifying the development command or environment variables may resolve the issue.

Notes

  • The issue appears to be specific to the combination of Next.js 15.5.1-canary, React 19, and Turbopack, and may be related to how Turbopack handles the "ping" message from MapLibre.
  • Disabling Turbopack or using a different development mode may have performance implications and should be evaluated carefully.

Recommendation

  • Apply workaround: Disable Turbopack by setting TURBOPACK=0 or running next dev without --turbo, as this has been reported to resolve the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix Turbopack dev server drops MapLibre inline worker (react-map-gl clusters, tilelayers never render) [3 comments, 3 participants]