Static asset requests to next.js trigger url slugs #10855
Replies: 4 comments 9 replies
-
|
I'm afraid that when you've set your dynamic routing up to |
Beta Was this translation helpful? Give feedback.
-
|
Hi, what version of Next.js are you on? I'm not able to reproduce this on the latest version of Next.js If a static file doesn't exist and it is at the same depth as your dynamic route then this is the expected behavior as we don't restrict what paths you are allowed to use with dynamic routes |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the help @ijjk and @willemliu The first part of the problem: I had my For the other issues like Thanks again for your help/time! |
Beta Was this translation helpful? Give feedback.
-
|
I ran into this same issue but in a slightly different situation, which I think might be a bug in the next.js deployment preset on My project has a monorepo* structure like so: Note the next.js site is in a sub-folder: I have
When I deploy this, the next.js site runs successfully, but none of the files from However, if I move the .
├── package.json
├── api
│ └── ...
+├── public (moved ./www/public to ./public)
+│ └── ...
└── www
├── package.json
├── next.config.js
├── pages
│ └── ...
- └── public
- └── ...Everything then works; the next.js site renders correctly, and all the files in This hints at there possibly being an issue with where the My assumption was; it would be moved to It appears this assumption is incorrect and instead it looks for it at Is this a bug, or expected behaviour?
|
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
I have an application that uses multiple url slugged routes i.e.
localhost:3000/[id]andlocalhost:3000/[id]/[otherId]for example.I take these url slugs and make requests to my server with them. I'm getting a ton of server requests where the slugs are static assets so
idfor example will bestaticandotherIdwill befavicon.ico.Logs in

_app.js:Console output:

I apologize in advance for the limited info, this is a closed source project but please let me know if you need more information
Beta Was this translation helpful? Give feedback.
All reactions