Next.js Discord

Discord Forum

Optional catch-all segment

Answered
Akshay Gole posted this in #help-forum
Open in Discord
Avatar
I don't understand what is wrong with my code!
When I apply double [[]], it does not work.
I have attached the video displaying my error (Please ignore the typing and clicking noice).
Image
Answered by B33fb0n3
No, I used the exact same code, as you saw online. You might want to try to disable caches, clear cookies, … to make sure you get the current page. If that still doesn’t work you can also try to delete the .next folder and restart the app AFTER you created the optional catch all
View full answer

14 Replies

Avatar
your error seems not reproduceable for me. See here: https://codesandbox.io/p/devbox/yq6wwh

Please share a repro of your issue via github or codesandbox to have a further look into the issue
Avatar
please have a look 🙂
Avatar
it looks like I can access the repo, but not the projects inside. Please share only one project repro
Image
Avatar
@B33fb0n3 Sorry for the error.

Please use this link: https://github.com/Akshay-Gole/nextJsLearning
Avatar
I just tested your code and your code works fine for me as well 🤔
See here: https://codesandbox.io/p/github/B33fb0n3/nextJsLearning/main?import=true
Avatar
Is it due to the turbopack?
Avatar
I have used same code, It does not work on my local system. Any potential solution?
Avatar
No, I used the exact same code, as you saw online. You might want to try to disable caches, clear cookies, … to make sure you get the current page. If that still doesn’t work you can also try to delete the .next folder and restart the app AFTER you created the optional catch all
Answer
Avatar
Okay I will try this and get back to you
It worked. I restarted the application and cleared the cache.

Thank you soo much for helping me. 🙂

You made learning easier.
Avatar
Happy to help