Skip to content

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

@hoangtubienxanh

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions