-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Closed
Description
Reproduction
- Go to https://codesandbox.io/p/sandbox/react-router-v7-sy3yht
- View the Chrome Devtools for the preview stating
{status: 404, statusText: 'Not Found', internal: true, data: 'Error: No route matches URL "/"', error: Error}
- Comment the line
middleware: [anyMiddleware],
out so no middleware is applied - Reload the page -> Route matching works
System Info
System:
OS: Windows 11 10.0.22631
CPU: (22) x64 Intel(R) Core(TM) Ultra 9 185H
Memory: 33.11 GB / 63.45 GB
Binaries:
Node: 22.20.0 - C:\Program Files\nodejs\node.EXE
npm: 11.6.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 10.15.1 - ~\AppData\Roaming\npm\pnpm.CMD
Browsers:
Edge: Chromium (140.0.3485.54)
Internet Explorer: 11.0.22621.3527
npmPackages:
react-router: ^7.9.2 => 7.9.2
vite: ^7.1.7 => 7.1.7
However, seems unrelated to the specific system as it is reproducible in the CodeSandbox.
Used Package Manager
npm
Expected Behavior
Route matching also works as before in v7.9.1 when using a middleware
.
Actual Behavior
Route matching fails for all routes after updating from v7.9.1 to v7.9.2 without changing any other code:
{status: 404, statusText: 'Not Found', internal: true, data: 'Error: No route matches URL "/"', error: Error}
nouman2075 and Christophe983