Next.js Discord

Discord Forum

404 page not found in vercel production, but usable in local dev+prod env

Unanswered
Vabolos posted this in #help-forum
Open in Discord
So I am currently using this template https://vercel.com/templates/next.js/documents-simple-next-js-documentation

and i've been making small changes to the site, and this has worked for me so far.
About a week ago I started adding my own pages to it and adding them to the document structure in documents.js, this will automatically add them to another file named documents.js

Whenever I'm working in the local development env, i can edit the new pages, move them around, see them, click them.. everything basically.
BUT!
When i commit the changes and deploy it on vercel, I get a 404 error from those pages saying that the page is not found. I then redeploy without previous build cache to see if that would've fixed it, but sadbly no.

Yes, I did check the build logs, adn there wasnt anything weird in there such as errors! I have also checked the deployment source, and I can see all of the files there.

This is the current structure of the files in the documents file:
{
    title: "Documentation",
    href: "/powershell",
    heading: "PowerShell",
    items: [
      {
        title: "Official Docs",
        href: "/documents",
        items: [
          {
            title: "Set-ExecutionPolicy",
            href: "/setexecution",
          },
          {
            title: "Get-ExecutionPolicy",
            href: "/getexecution",
          },
          {
            title: "Get-Credential",
            href: "/getcredential",
          },
          {
            title: "Set-AuthenticodeSignature",
            href: "/setauthenticode",
          }
        ],
      },
      {
        title: "Learning",
        href: "/learning",
        items: [
          {
            title: "pwsh Basics",
            href: "/basics",
          },
          {
            title: "pwsh Advanced",
            href: "/advanced",
          },
          {
            title: "pwsh Professional",
            href: "/professional",
          }
        ]
      },
      {
        title: "Shellboxing",
        href: "/shellboxing",
      },
    ]
  },


maybe I did it wrong, that's a possibility too

If you need any more information, please feel free to ask. I really like this template and the looks of it, so I hope I (we) can fix this. :D

1 Reply

this is the current page in production: https://vabolosdocs.vercel.app/