-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
Which project does this relate to?
Start
Describe the bug
When someone imports server code on the client in the current iteration of tanstack start, vite gives a very hard-to-debug error which doesn't expose what file is generating that error. This is a pretty awful issue to debug, especially for projects moving to the RC.
Split off of #5196 (comment), which you should read for more context.
Example error message:
../node_modules/@tanstack/start-server-core/dist/esm/loadVirtualModule.js:5:26:
5 │ return await import("tanstack-start-manifest:v");
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your Example Website or App
Steps to Reproduce the Bug or Issue
import { getRequest } from "@tanstack/react-start/server";(or similar) on a client-only file
Expected behavior
As a user, I am alright with this erroring, but the error should be actionable instead of blowing up without further guidance. Specifically, I'd really love for the error to point to the offending files.
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.131.7
- OS: macOS
- Browser: All
- Bundler: Vite
- Bundler Version: 7.1.7
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels