Next.js Discord

Discord Forum

Dynamic routes parameters keep getting resolved to JS files

Unanswered
Short mackerel posted this in #help-forum
Open in Discord
Short mackerelOP
I have created a basic app in NextJS 14 using the App Router and I in some specific scenarios, my dynamic route params are being resolved to some random JS files like: "backendManager.js.map" or "react_devtools_backend_compact.js.map"

This happens on both API and page routes, for example:
GET /api/clients/installHook.js.map 400 - route template: /api/clients/[id]
GET /api/projects/backendManager.js.map 400 - route template: /api/projects/[id]
GET /1/clients/renderer.js.map 400 - route template: /[tenant]/clients/[id]
GET /1/projects/backendManager.js.map 400 - route template: /[tenant]/projects/[id]

I had a similar issue with favicon.ico being substituted as one of the route parameters, but I resolved the issue by adding a header an a file in the /public folder thanks to https://github.com/vercel/next.js/discussions/13301

I did notice that those are only *.map files.

Does anybody have any ideas how to get rid of those GET requests?

1 Reply

Short mackerelOP
It turned out React Devtools was injecting those files to my routes for some reason...