-
Notifications
You must be signed in to change notification settings - Fork 66
Preview: Catch-all page at root level catches requests for NextJS static assets #41
Comments
Interesting scenario! You have a catch-all route at root-level — it catches all paths: /whatever/path/... The request at Because of shadowing, your request for If you have time, the following would be extremely helpful:
|
I am using the following The site is deployed here: https://friendly-babbage-dcd353.netlify.app/, but I don't know how to see the same logging. |
That's a bug in netlify dev! https://github.com/netlify/cli/blob/c4ce6bba298ab3c7deb0d5b409e9c36ff21fd3da/src/utils/proxy.js#L149 You can create an issue or PR in netlify dev, if you want. A quick workaround in the meantime is to add a custom redirect to your NextJS app by adding a
This redirect will become the first redirect in your list of Netlify redirects and catch all the requests for NextJS static assets. |
I'll make a PR for this @FinnWoelm, thanks for finding that!! |
Awesome! 🙌 😊 I already have a sample repo https://github.com/FinnWoelm/netlify-uri-bug, in case it's helpful. |
The CLI fix is released in the latest CLI version - v2.63.3, thanks @cassidoo and @FinnWoelm. Please let me know if you're experiencing other issues. |
Tested, works as a charm! Thanks for the prompt fix over the weekend 🚀 |
I have the following (minimal) example:
When I run this example using
netlify dev
I get an invalid getStaticProps parameter value forslug
:_next,static,chunks,pages,[...slug]-0ab994ad29aa8a4f0aaa.js
.The full output is:
Is this a bug?
NB. the
<Link>
element is necessary to trigger the behaviour.The text was updated successfully, but these errors were encountered: