Error 404, NOT_FOUND at deploy

Hi everyone,

I’ve done my first deployment for a personal single-screen project, but even though I’ve followed the instructions in the documentation and searched on the internet I can’t solve my problem. I’m attaching the different configurations I’ve tried in my ‘vercel.json’ file and development settings.

Thank you very much for taking the time to read my problem.
Best regards

{
  "version": 2,
  "public": true,
  "routes": [
    { "src": "/(.*)", "dest": "/index.html" }
  ]
}
{
  "rewrites": [
      {
        "source": "/(.*)", "destination": "/"
      }
    ]
}
{
  "version": 2,
  "buildCommand": "yarn vercel-build",
  "installCommand": "yarn install",
  "framework": "angular",
  "outputDirectory": "dist/TravelBlog",
    "builds": [
    {
      "src": "package.json",
      "use": "@vercel/static-build",
      "config": {
        "distDir": "dist/TravelBlog"
      }
    }
  ],
  "routes": [
    {
      "src": "",
      "dest": "/assets/$1"
    },
    {
      "src": "/favicon.ico",
      "dest": "/favicon.ico"
    },
    {
      "src": "/(.*)",
      "dest": "/index.html"
    }
  ]
}

You should be able to see the list of static assets and functions for your deployed project in the Build Summary section of the deployment details page. You can also see the output file structure if you toggle over to Output on the Source tab.

Does the build output match what you expected?

Hello! I’m having issues with my Angular SSR deployment on Vercel. Looking at my deployment output and configuration files, I notice there’s a problem with the folder structure, with duplication of the browser and middleware folders.

I’ve shared the following:

  • My structure project
  • My output
  • The static assets

My application isn’t working correctly in production. Could you help me understand if this unusual folder structure might be causing problems with static asset serving and SSR functionality?

I’m experiencing specific issues with asset loading and routing. Could you help me identify if the duplicated structure is causing these problems? What additional information would you need to better diagnose the issue?

Are there any specific errors I should look for in production or certain features I should test to provide more details about the problem? Any guidance would be greatly appreciated.



I wasn’t able to replicate the issue with a quick Angular starter app. My project uses the Angular Framework Preset defaults and no vercel.json routes or rewrites.

Deployment: https://angular-1889.vercel.app
Repo: GitHub - amyegan/angular-1889

But it seems like your app is designed in a less standard and more complex way than my overly simple example. It may help to read up on the Build Output API. That’s the file-system-based specification for a directory structure that can produce a Vercel deployment.

1 Like

Thank you for taking the time to respond so thoroughly and for sharing your knowledge in this discussion. I also greatly appreciate the effort you put into implementing a possible solution and sharing your repository with the detailed implementation. Your insights and feedback have been invaluable. Thank you once again!
And I hope to deploy it someday lol.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.