Skip to content

Occulted Vite errors in dev mode Cloudflare - Error running module " #14177

@tavoyne

Description

@tavoyne

Reproduction

  1. Start an RR app using the Cloudflare template:
npx create-react-router@latest --template remix-run/react-router-templates/cloudflare 
  1. Open /app/routes/home.tsx.

  2. Change an import path to an intentionally incorrect one ("../welcome/welcome" → "/blabla").

  3. Start the dev server.

npm run dev 
  1. Open http://localhost:5173/

System Info

System: OS: macOS 14.5 CPU: (8) arm64 Apple M3 Memory: 261.56 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.18.0 - ~/.nvm/versions/node/v22.18.0/bin/node npm: 10.9.3 - ~/.nvm/versions/node/v22.18.0/bin/npm Browsers: Chrome: 139.0.7258.68 Safari: 17.5 npmPackages: @react-router/dev: ^7.7.1 => 7.8.0 react-router: ^7.7.1 => 7.8.0 vite: ^6.3.3 => 6.3.5

Used Package Manager

npm

Expected Behavior

I'm expecting the actual build error to be reported:

Image

Actual Behavior

But I get this instead:

Image

Note: if you launch the dev server before changing the import path, it will surface the right error until you reload the page or get a new HMR update.

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