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.
https://tanstack.com/router
MIT License
7.19k stars 486 forks source link

docs(examples): set correct correct server entry-point for production for "basic-ssr" #1562

Closed NimmLor closed 1 week ago

NimmLor commented 1 week ago

The server for the "Basic + SSR" (and the wip-with-bling) example is specifiying the wrong file name that gets built into the dist folder.

To reproduce:

  1. Open the Stackblitz project: https://tanstack.com/router/latest/docs/framework/react/examples/basic-ssr-file-based
  2. npm i
  3. npm run build
  4. npm run serve

Produces the following error:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/projects/wmaivvaxx.github/dist/server/entry-server.tsx' imported from /home/projects/wmaivvaxx.github/server.js
    at __node_internal_captureLargerStackTrace2 (https://wmaivvaxxgithub-vsdf.w-staticblitz.com/builtins.575e820e.js:101:5528)
    at new NodeError (https://wmaivvaxxgithub-vsdf.w-staticblitz.com/builtins.575e820e.js:101:4214)
    at finalizeResolution (https://wmaivvaxxgithub-vsdf.w-staticblitz.com/builtins.575e820e.js:158:11255)
nx-cloud[bot] commented 1 week ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 2a99d29e4a8b750f2ea4596342b0befebafa80a8. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets - [`nx affected --targets=test:format,test:eslint,test:unit,test:build,build --parallel=3`](https://cloud.nx.app/runs/YyRtl3Qj2d?utm_source=pull-request&utm_medium=comment) - [`nx affected --target=test:types --exclude=examples/**`](https://cloud.nx.app/runs/OylYVXyeBQ?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.