Skip to content

[Bug?]: Dev overlay still imports SourceMapConsumer as a named export from source-map-js#2107

Description

@pRizz

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 馃槸

On the latest stable release (@solidjs/start@1.3.2, vinxi@0.5.11), a client-side runtime error in dev can still cascade into a second browser-module error from SolidStart's dev overlay:

get-source-map.js?... Uncaught (in promise) SyntaxError: The requested module '/node_modules/source-map-js/source-map.js?...' does not provide an export named 'SourceMapConsumer'

This appears to be the same root cause as the previously closed issue #1219, but the import is still present in the published package here:

// @solidjs/start/dist/shared/dev-overlay/get-source-map.js
import { SourceMapConsumer } from 'source-map-js';

Because source-map-js/source-map.js is served as a CommonJS-style module in the affected browser session, the overlay crashes while trying to resolve source maps for the original runtime error. In practice this makes the real error harder to debug because the dev tooling adds a second failure on top.

Expected behavior 馃

The dev overlay should handle runtime errors without throwing an additional module-loading error, and stack-frame sourcemap resolution should work against the shipped source-map-js dependency shape.

Steps to reproduce 馃暪

Repro repo: https://github.com/pRizz/solid-start-dev-overlay-sourcemap-repro

Steps:

  1. git clone https://github.com/pRizz/solid-start-dev-overlay-sourcemap-repro.git
  2. cd solid-start-dev-overlay-sourcemap-repro
  3. bun install
  4. bun run dev
  5. Open the local URL in Chrome
  6. Click Trigger client error
  7. Watch the browser console and the dev overlay

Notes:

  • The repro app is intentionally minimal and current-stable.
  • The only intentional app-side failure is the button-triggered client error.
  • In the affected Chrome session, that runtime error is followed by the SourceMapConsumer module error above.

Context 馃敠

I hit this while debugging a separate hydration problem in another app. The extra SourceMapConsumer failure was coming from SolidStart's own dev-overlay code, not from the application code, and it obscured the original error signal.

As a local workaround, I had to alias source-map-js to a shim that default-imports the CJS entry and re-exports SourceMapConsumer as a named export. That workaround should not be necessary in a stock app on the latest stable release.

Your environment 馃寧

System:
  OS: macOS 26.3
  CPU: arm64
Binaries:
  Node: v24.13.0
  Bun: 1.3.9
Browser:
  Chrome: 146.0.7680.80
npmPackages:
  @solidjs/start: 1.3.2
  vinxi: 0.5.11
  @solidjs/router: 0.15.4
  solid-js: 1.9.11
  vite: 6.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions