-
Recently I bought a Next.js template on Themeforest and I tried to deploy it to Zeit Now. This is a monorepo that using Lerna and Yarn workspace. Code of the Next.js app is inside Everything is fine with the index page (the page at The problem arises when I tried to add a new page inside If I navigate the these pages through a You can see what I mean by going to this page https://superprops-2-r09pdhfab.now.sh/. It works fine when reloading. But if you open this page https://superprops-2-r09pdhfab.now.sh/saas, you will see 404 (the code for In my localhost development, it works fine for all pages when reloading. So I think that the problem is from Zeit Now configuration. This is the code inside {
"version": 2,
"builds": [
{ "src": "packages/landing/package.json", "use": "@now/static-build" }
],
"routes": [
{
"src": "/(.*)",
"dest": "/packages/landing/$1",
"headers": {
"x-request-path": "$1"
}
}
]
}
How to fix this? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Also when I tried to export this project and upload to Netlify for testing purpose, it works fine. So I think it's not a problem with the code. |
Beta Was this translation helpful? Give feedback.
-
Can you check if the "output folder" has your page there? The route looks correct as far as I can see. |
Beta Was this translation helpful? Give feedback.
-
I create a new Next project and move all code into this new project and it works fine zero-config. |
Beta Was this translation helpful? Give feedback.
I create a new Next project and move all code into this new project and it works fine zero-config.
So I guess problem is solved