Next.js Discord

Discord Forum

Not able to access a route

Answered
Scale parasitoid posted this in #help-forum
Open in Discord
Avatar
Scale parasitoidOP
I created a route called /logs in Nextjs13 app directory. I am able to navigate locally but after deploying in vercel , the navigation to logs route on a button click is not happening. Other routes ie /about, /profile is possible.
When I try to access /logs I will get 404 not found error.
Answered by Scale parasitoid
LOL . Found the issue. I had logs folder inside .gitignore
View full answer

16 Replies

Avatar
DhrishP1
Send the code
do and file structure
Avatar
Scale parasitoidOP
https://github.com/codefromrvk/portfolio/tree/next/develop

This is repo.

I changed the route to /daily-logs it worked fine
Folder structure:
app/
----logs/
---------page.tsx

This is the route that I am getting the error.
Avatar
Scale parasitoidOP
@DhrishP1 Check my portfolio - https://rvkay.in/ I have added working and not working daily logs route .
I have same the content in both the page
Avatar
DhrishP1
So the issue solved right?
Avatar
Scale parasitoidOP
No. I want to know why /logs route is not working
Avatar
Scale parasitoidOP
LOL . Found the issue. I had logs folder inside .gitignore
Answer
Avatar
Scale parasitoidOP
cc @Multiflora rose seed chalcid
Better not have logs folder in .gitignore
Avatar
joulev
btw this is not a nextjs issue because the default nextjs gitignore doesn't have logs
from your commit you added it [here](https://github.com/codefromrvk/portfolio/commit/d32b847da81641b35f718d6e517a688693168b8f#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947) which is when you initialised the repo with not even a nextjs template
so maybe you should contact whoever provided you with that template (it's not nextjs)
submit a bug report in their repo perhaps
Avatar
Scale parasitoidOP
@joulev Thanks