T
TanStack16mo ago
genetic-orange

SSR Examples don't build?

❯ npm run build:client

> frontend@0.0.0 build:client
> vite build src/entry-client.tsx --outDir dist/client

vite v5.2.11 building for production...
✓ 0 modules transformed.
x Build failed in 9ms
error during build:
RollupError: Could not resolve entry module "src/entry-client.tsx/index.html".
at getRollupError (file:///home/srp/Code/go/zettel/pkg/frontend2/node_modules/rollup/dist/es/shared/parseAst.js:396:41)
at error (file:///home/srp/Code/go/zettel/pkg/frontend2/node_modules/rollup/dist/es/shared/parseAst.js:392:42)
at ModuleLoader.loadEntryModule (file:///home/srp/Code/go/zettel/pkg/frontend2/node_modules/rollup/dist/es/shared/node-entry.js:19123:20)
at async Promise.all (index 0)
❯ npm run build:client

> frontend@0.0.0 build:client
> vite build src/entry-client.tsx --outDir dist/client

vite v5.2.11 building for production...
✓ 0 modules transformed.
x Build failed in 9ms
error during build:
RollupError: Could not resolve entry module "src/entry-client.tsx/index.html".
at getRollupError (file:///home/srp/Code/go/zettel/pkg/frontend2/node_modules/rollup/dist/es/shared/parseAst.js:396:41)
at error (file:///home/srp/Code/go/zettel/pkg/frontend2/node_modules/rollup/dist/es/shared/parseAst.js:392:42)
at ModuleLoader.loadEntryModule (file:///home/srp/Code/go/zettel/pkg/frontend2/node_modules/rollup/dist/es/shared/node-entry.js:19123:20)
at async Promise.all (index 0)
After cloning the example from the repo: https://github.com/TanStack/router/tree/main/examples/react/basic-ssr-file-based and making zero changes to the files and attempting a build I get the above errors. There doesn't seem to be an index.html referenced anywhere in the example code anywhere nor is there an index.html included at all. Based off the flow of the code it doesn't seem as if it intends to have an index.html so why is the build from Rollup looking for one? I've tried doing it with fresh installs of all the involved packages as well. I don't have another machine or a virtual machine to try the process in another environment but it seems like it's an issue with the vite (I'm using v5.2.11) build process expecting an index.html? I originally was running into the same build errors with my own application, where I assumed I had set something up wrong but the issue exists even when using the example repo. Anyone have any advice on how I can get this SSR setup rolling? Oh, as a side note - Everything works great in dev. I simply cannot build it.
GitHub
router/examples/react/basic-ssr-file-based at main · TanStack/router
🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering. - TanStack/router
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?