# Fixing the Mysterious 404 When Deploying Angular 19 to Vercel

## TL;DR

When deploying Angular 19 apps to Vercel, override the output directory setting to `dist/[your-app-name]/browser`to avoid the dreaded 404 page if you use the `@angular-devkit/build-angular:application` builder

## The Backstory

There I was, feeling accomplished after building my shiny new Angular 19 app. "Time to deploy!" I thought gleefully. I connected my GitHub repo to Vercel, watched the build succeed with flying colors, and then... 404. The digital equivalent of showing up to a party at the wrong address. What gives, Vercel?

## The Problem

Angular 19 uses the `@angular-devkit/build-angular:application` builder as the default builder. However, Vercel stubbornly expects you to be using the `@angular-devkit/build-angular:browser` builder, and its deployment settings are configured accordingly.

```json
// What Angular 19 has in angular.json
"architect": {
  "build": {
    "builder": "@angular-devkit/build-angular:application",
    // ...which outputs files to a different location than Vercel expects
  }
}
```

When Vercel tries to serve your app, it's looking in the wrong place – like a delivery driver dropping your pizza at your neighbor's house, it sucks.

## The Insight

The fix is surprisingly simple: you need to explicitly tell Vercel where your application's output is located. In the Vercel deployment settings, you must override the default output directory path.

Set your Vercel build output directory to:

```bash
dist/[your-app-name]/browser
```

For example, in my case:

```bash
dist/play-pulse/browser
```

This tells Vercel: "Hey, don't look in the usual place. The party's over here!"

## Why It Matters

This small configuration hiccup can cause a lot of head-scratching and time wasted debugging deployments. Angular's evolution to the new application builder is great for development, but deployment platforms need time to catch up. Understanding these nuances between your build tools and deployment platforms is crucial for smooth DevOps.
