You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A syntax error in a file route, or in anything a route imports, makes the page go blank in dev with no error overlay and no console output. The HTTP request never completes: the document shell is flushed and the connection then stays open indefinitely, so the browser considers the page "loaded" and Vite never shows its overlay.
Reproduced on apps/fixtures/basic at 2.0.0-rc.5 by breaking a JSX closing tag in src/components/Counter.tsx:
Cause is upstream, not in Start: solidjs/solid#2945. Solid's server-side lazy() attaches only a success handler to the module promise, so a rejected dynamic import leaves the Suspense boundary's _loading flag set forever, notifySuspense never fires, and renderToStream never calls end(). Every file route in Start goes through lazy() (packages/start/src/router.tsx), which is why any route with a syntax error hits it.
Note this is the lazy sibling of #1648, which covers the eager app.tsx path. Those behave differently: an error in app.tsx is an eager import that fails at handler level and does produce an error page, whereas a lazy route module wedges the stream with no output at all.
Expected behavior 🤔
The error reaches the nearest ErrorBoundary, the dev overlay shows the syntax error and source frame, and the response completes.
Steps to reproduce 🕹
pnpm create solid (or use apps/fixtures/basic), start the dev server.
Introduce a syntax error in any route under src/routes/, or in a component the route imports.
Load the route.
The page is blank, no overlay appears, and the request never finishes.
Context 🔦
Start can work around this locally: its server-only withAssets wrapper in packages/start/src/shared/lazy.ts already wraps the route import for asset collection, so it can catch the rejection there and resolve with a component that throws during render. The throw then reaches the nearest ErrorBoundary and the dev overlay displays it. Once solidjs/solid#2945 lands, that catch becomes redundant and can be dropped.
Filing this to track the upstream dependency. Three related gaps a local workaround does not address:
Client hydration path. Solid's browser lazy uses the same success-only .then in its hydration branch (dist/solid.js:1442); on rejection sharedConfig.count is never decremented, so a chunk that 404s during initial hydration can still stall. Not reproduced, noted in renderToStream() never closes when a lazy() component's module promise rejects solid#2945. SPA mode is unaffected, since it goes through createResource.
No auto-reload after the file is fixed. With the page already open, correcting the syntax error does not trigger a reload; a manual refresh is needed.
Wrong error on HMR without a reload. The toolbar reports TypeError: Failed to fetch dynamically imported module rather than the underlying syntax error. Reloading surfaces the real one.
Duplicates
Latest version
Current behavior 😯
A syntax error in a file route, or in anything a route imports, makes the page go blank in dev with no error overlay and no console output. The HTTP request never completes: the document shell is flushed and the connection then stays open indefinitely, so the browser considers the page "loaded" and Vite never shows its overlay.
Reproduced on
apps/fixtures/basicat 2.0.0-rc.5 by breaking a JSX closing tag insrc/components/Counter.tsx:Cause is upstream, not in Start: solidjs/solid#2945. Solid's server-side
lazy()attaches only a success handler to the module promise, so a rejected dynamic import leaves the Suspense boundary's_loadingflag set forever,notifySuspensenever fires, andrenderToStreamnever callsend(). Every file route in Start goes throughlazy()(packages/start/src/router.tsx), which is why any route with a syntax error hits it.Note this is the lazy sibling of #1648, which covers the eager
app.tsxpath. Those behave differently: an error inapp.tsxis an eager import that fails at handler level and does produce an error page, whereas a lazy route module wedges the stream with no output at all.Expected behavior 🤔
The error reaches the nearest
ErrorBoundary, the dev overlay shows the syntax error and source frame, and the response completes.Steps to reproduce 🕹
pnpm create solid(or useapps/fixtures/basic), start the dev server.src/routes/, or in a component the route imports.Context 🔦
Start can work around this locally: its server-only
withAssetswrapper inpackages/start/src/shared/lazy.tsalready wraps the route import for asset collection, so it can catch the rejection there and resolve with a component that throws during render. The throw then reaches the nearestErrorBoundaryand the dev overlay displays it. Once solidjs/solid#2945 lands, that catch becomes redundant and can be dropped.Filing this to track the upstream dependency. Three related gaps a local workaround does not address:
lazyuses the same success-only.thenin its hydration branch (dist/solid.js:1442); on rejectionsharedConfig.countis never decremented, so a chunk that 404s during initial hydration can still stall. Not reproduced, noted in renderToStream() never closes when a lazy() component's module promise rejects solid#2945. SPA mode is unaffected, since it goes throughcreateResource.TypeError: Failed to fetch dynamically imported modulerather than the underlying syntax error. Reloading surfaces the real one.Your environment 🌎
@solidjs/start2.0.0-rc.5solid-js1.9.14vite8.1.5