getting 404 in production but works locally
GitHub
GitHub - bentoodev/crm-grow
Contribute to bentoodev/crm-grow development by creating an account on GitHub.
19 Replies
bump
Just looking at the console error from https://crm-grow.vercel.app:
I see your sidebar pop in and out before the error happens. Try removing it to see if the error is in there.
Also don't have your
components
folder inside your pages
folder. Only pages and api routes should exists there.
Also check line 12 in /pages/sign-in.tsx
:
This should probably be wrapped in useEffect and only happen on clientAlso your sign-in page should be sign-in/[[...index]].tsx if you are using Clerk as we need to be able to handle the redirect portion which /sign-in doesn't
this is how i conditionally render my sidebar is there a better way to do this?
i changed it to pages/sign-in/index.tsx is that right?
any idea why im getting these errors in my console?
This should be
pages/sign-in/[[...index]].tsx
as a catch-all route.oh okay
More info on catch-all routes if you haven't run into them before:
https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes
hey @joerambo I still cant solve the issue any more ideas?
i feel that theres a problem with _app.tsx but im not sure
is conditionally rendering in _app.tsx okay?
I haven't really looked that deep but you named your file in here: https://github.com/bentoodev/crm-grow/tree/main/src/pages/sign-in
[[...index]].tsx.tsx
GitHub
crm-grow/src/pages/sign-in at main · bentoodev/crm-grow
Contribute to bentoodev/crm-grow development by creating an account on GitHub.
thanks for pointing that out but its still returning 404s
Are you using sqlite db ?
I just had this issue and I switched to using railway for my database and it worked for me let me know if that works
nope im using mysql in planetscale
did you set up your development properly? like your .env things on vercel?
yes
i removed the conditional logic in _app.tsx that stopped the hydration error but still getting the 404 on sign-in
fixed:
skipMiddlewareUrlNormalise: false ( in nexjs.config )
Solved by removing i18n on next.config.mjs
YOu are one of the reasons I have faith in humanity, You found a similar post and posted a suggestion a true hero man
My biggest pet peve is when people say nvm solved it and just leave
=/
It was already 1 AM where I live, I was losing sanity while trying to solve it