router.replace() not working in production i.e vercel
Unanswered
African Slender-snouted Crocodil… posted this in #help-forum
African Slender-snouted CrocodileOP
Im using
router.replace("/home") in login page after i send a post login request to login api route and it sends a response with success: true / false, and if success is true i do router.replace("/home") but im not redirecting to /home page , im only in /login page. There is no error nothing11 Replies
@African Slender-snouted Crocodile Im using `router.replace("/home")` in login page after i send a post login request to login api route and it sends a response with success: true / false, and if success is true i do `router.replace("/home")` but im not redirecting to /home page , im only in /login page. There is no error nothing
if you run
npm run build && npm run start, do you see this behaviour?@"use php" if you run `npm run build && npm run start`, do you see this behaviour?
African Slender-snouted CrocodileOP
yep its the same it doesnt redirect
but works in npm run dev
Can you send a min repro repo
@"use php" Can you send a min repro repo
African Slender-snouted CrocodileOP
Can I send tomorrow it's midnight here
Send whenever you can, and make sure to ping me
when you send
@"use php" Send whenever you can, and make sure to ping me
African Slender-snouted CrocodileOP
its working now, i dont know how but its redirecting now
African Slender-snouted CrocodileOP
@"use php" but it randomly stops working
most of the time its not working, but sometime its working