Skip to content

tanstack start + nitro breaks notFound() in development #6047

@paperclover

Description

@paperclover

Which project does this relate to?

Start

Describe the bug

the hosting guide (https://tanstack.com/start/latest/docs/framework/react/guide/hosting) suggests to use nitro for most outputs, but this breaks notFound

Your Example Website or App

https://github.com/paperclover/bug-reproductions/tree/tanstack-nitro-404

Steps to Reproduce the Bug or Issue

  • npm i
  • npm run dev
  • open to /, click on either link, it works
  • refresh the page
  • see Cannot GET / instead of the NotFound.tsx component

Expected behavior

to see NotFound.tsx

Screenshots or Videos

n/a

Platform

  • Router / Start Version: [e.g. 1.121.0]
  • OS: n/a
  • Browser: curl
  • Browser Version: 8.7.1
  • Bundler: vite/nitro
  • Bundler Version: latest

Additional context

if this is a bug in nitro, it is still tanstack's job to have correct documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions