Skip to content

ENOENT error whenever I change a route module's exports #13607

Open
@rossipedia

Description

@rossipedia

I'm using React Router as a...

framework, SSR-enabled

Reproduction

Unfortunately I have not been able to create a minimal reproduction. The only place I see this is in our (Docker) internal web monorepro. I'd be more than happy to get on a Zoom call or similar with somebody to demonstrate the issue.

System Info

System:
    OS: macOS 15.4.1
    CPU: (12) arm64 Apple M2 Max
    Memory: 4.35 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.15.0 - ~/.local/state/fnm_multishells/61607_1747190035669/bin/node
    npm: 11.3.0 - ~/.local/state/fnm_multishells/61607_1747190035669/bin/npm
    pnpm: 10.7.1 - ~/.local/state/fnm_multishells/61607_1747190035669/bin/pnpm
    bun: 1.2.5 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 111.1.49.132
    Chrome: 136.0.7103.93
    Edge: 136.0.3240.64
    Safari: 18.4

Used Package Manager

yarn

Expected Behavior

I should be able to change a route module's exports (default, loader, action, clientAction, `clientLoader, etc…) and HMR should work and I should be able to reload the page in my browser without error.

Actual Behavior

When I add/remove one of the React Router route module exports, my dev server reloads, but I see this error in terminal output, and my express error handler is always triggered (this is the error handler that is added after the React Router handler, and is used as a "catch-all" final error handler when things go catastrophically wrong).

11:13:16 AM [vite] Pre-transform error: ENOENT: no such file or directory, open './build/client/.vite/manifest.json'
11:13:16 AM [vite] Error when evaluating SSR module virtual:react-router/server-build:
|- Error: ENOENT: no such file or directory, open './build/client/.vite/manifest.json'

This error gets "stuck" and I have to kill the process with SIGINT (Ctrl-C) and restart the process to get things working again.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions