cli
cli copied to clipboard
Dynamic route handler fails occasionally on Windows with 404
Environment
Nuxt project info:
- Operating System: Windows_NT
- Node Version: v18.13.0
- Nuxt Version: 3.7.0
- CLI Version: 3.7.3
- Nitro Version: 2.6.2
- Package Manager: [email protected]
- Builder: -
- User Config: modules, runtimeConfig
- Runtime Modules: @nuxtjs/[email protected]
- Build Modules: -
Reproduction
The following sandbox will produce the problem when the wayfinderContentDir
in nuxt.config.ts
is set to ./data
rather than ./data_mini
on a Windows machine
https://codesandbox.io/p/sandbox/naughty-platform-hrsvqk
This will sporadically require moving between the pages of /
and /craft/[id].vue
, where you can see the particular item with only the requested ID rather than it's name and description displayed.
Describe the bug
Occasionally instead of receiving an output, instead a dynamic route handler throws a 404 when under enough stress(?) on windows platforms.
Additional context
This problem seems to be when I have a large enough file loaded in the context of a route handler. The items.json
provided when stripped of the localization information drops from ~250kb, to ~45kb, and reduces or eliminates the problem.
In addition the problem does not seem to be reproducible on WSL, or in the code sandbox.
Logs
XHRGET
http://localhost:3000/api/item/Spectra_Ruins_C_GW3
[HTTP/1.1 404 Cannot find any path matching /api/item/Spectra_Ruins_C_GW3. 5ms]
statusCode 404
statusMessage "Cannot find any path matching /api/item/Spectra_Ruins_C_GW3."
stack []