Start Counter example fails on StackBlitz (linked from Build a Project from Scratch)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
Which project does this relate to?
Router
Describe the bug
On https://tanstack.com/start/latest/docs/framework/react/build-from-scratch, “Here is what that will look like” links to https://stackblitz.com/github/tanstack/router/tree/main/examples/react/start-counter. It seems to build successfully, but shows the error No Start context found in AsyncLocalStorage. Make sure you are using the function within the server runtime.:
Complete minimal reproducer
https://stackblitz.com/github/tanstack/router/tree/main/examples/react/start-counter
Steps to Reproduce the Bug
- Visit https://tanstack.com/start/latest/docs/framework/react/build-from-scratch
- Click “Here is what that will look like”
- Wait for the build to finish
Expected behavior
I expected to see the counter, not an error.
Screenshots or Videos
No response
Platform
- Router / Start Version: ^1.170.8 / ^1.168.11
- OS: macOS
- Browser: Brave
- Browser Version: 1.90.124
- Bundler: vite
- Bundler Version: ^8.0.0
Additional context
This issue is not stopping me in any way, just thought I’d help the next guy :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by opening the Build a Project from Scratch page and the examples/react/start-counter entry linked in the issue, then reproduce the failure in StackBlitz. Trace why the example reports that no Start context is found in AsyncLocalStorage. Done means the linked StackBlitz project builds and displays the counter instead of the error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript, vite
- Domain
- documentation, full-stack
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100