T
TanStack2mo ago
inland-turquoise

Built TanStack Start (Solid) project from create-tsrouter-app not serving client code/assets

Hello! I've set up a new project using create-tsrouter-app with the Solid framework, but after a successful build, the production server doesn't seem to be serving the client-side code (JS/CSS). The page loads without styles or interactive elements. My Setup and Steps: Creation Command: npx create-tsrouter-app@latest --framework solid CLI Options Chosen: Router: TanStack Router (File-based) State Management: TanStack Store Environment Variables: Te3Env UI Library: Solid UI Form Library: TanStack Form Build Command: npm run build (completes successfully) Start Command: "start": "pnpx srvx --prod -s ../client dist/server/server.js", The Problem: After running npm run start and opening the page in a browser, the static HTML from the server loads, but all the associated JavaScript and CSS files return 404 Not Found errors in the network tab. The page is non-interactive and unstyled. even the example didn't work after sucessful build
5 Replies
rare-sapphire
rare-sapphire2mo ago
cc @brenelz @Birk Skyum do we need to update the cli template for solid?
absent-sapphire
absent-sapphire2mo ago
The start templates were updated recently, but it looks like the new start templates are also now used for just the router, with the __root having <html> and all.
inland-turquoise
inland-turquoiseOP2mo ago
so i can't use solid with start
absent-sapphire
absent-sapphire2mo ago
You can - we just still work on supporting Start in the create-tsrouter-app, which is mainly intended for bootstrapping SPAs, but there's a tanstack solid start example here that would be good to bootstrap from https://tanstack.com/start/latest/docs/framework/solid/examples/start-basic?panel=code
Solid TanStack Start Start Basic Example | TanStack Start Docs
An example showing how to implement Start Basic in Solid using TanStack Start.
inland-turquoise
inland-turquoiseOP2mo ago
thank u i got what i need to start production server just add "start":"vite" will start the server correctly i got from the above example u give me thank u👍

Did you find this page helpful?