Skip to content

Windows: [Server] [fetchFs] Tried to read file that does not exist #928

Open

Description

@hoangtubienxanh

Describe the bug

[fetchFs] Tried to read file that does not exist

Image

Steps to reproduce

I followed local setup in https://github.com/TanStack/tanstack.com/blob/main/README.md

Directory structure

D:\external\tanstack
├── query
├── router
├── table
├── tanstack.com
└── virtual
  1. pnpm install
  2. pnpm run dev
  3. set ENV:TANSTACK_DOCS_USE_REMOTE = false
  4. navigate url http://localhost:3001/query/latest using chrome

Additional context

OS: Windows 11 running on VM

What's worked for me

import { fileURLToPath } from 'node:url'

const dirname = path.dirname(fileURLToPath(import.meta.url))
const baseDir = path.resolve(dirname, `../../../${repo}`)
const localFilePath = path.resolve(baseDir, filepath)

Activity

  1. tannerlinsley commented on Oct 16, 2026

    @tannerlinsley
    Member

    The current path helper now uses fileURLToPath(import.meta.url) before path.dirname, matching the conversion in your workaround. I checked the reported D:\external\tanstack layout using Node's Windows URL conversion and win32 path operations: the query fallback resolves to D:\external\tanstack\query.

    That verifies the path calculation only. I haven't run the full site in a Windows VM, and the current dev server also uses a local-docs bridge, so I'm keeping this open. Could you retry on current main and share the full attempted-path message if it still fails? Also note whether TANSTACK_LOCAL_REPOS_DIR is set. Please leave credentials out of any logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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