angular/angular-cli · warning

The output location of the browser build has been updated fr

Error message

The output location of the browser build has been updated from "${outputPath}" to "${join(outputPath, 'browser')}". You might need to adjust your deployment pipeline or, as an alternative, set outputPath.browser to "" in order to maintain the previous functionality.

What it means

The use-application-builder migration moves projects from the browser builder to the application builder, which outputs browser assets into a 'browser' subdirectory of outputPath. This warning tells you the effective output location changed and downstream consumers (deployment scripts, pipelines) may need updating, or you can set outputPath.browser to "" to keep old behavior.

Source

Thrown at packages/schematics/angular/migrations/use-application-builder/migration.ts:69

      options['index'] = false;
    }

    // Rename and transform options
    options['browser'] = options['main'];
    if (serverTarget && typeof options['browser'] === 'string') {
      options['server'] = dirname(options['browser']) + '/main.server.ts';
    }
    options['serviceWorker'] = options['ngswConfigPath'] ?? options['serviceWorker'];

    if (typeof options['polyfills'] === 'string') {
      options['polyfills'] = [options['polyfills']];
    }

    let outputPath = options['outputPath'];
    if (typeof outputPath === 'string') {
      if (!/\/browser\/?$/.test(outputPath)) {
        // TODO: add prompt.
        context.logger.warn(
          `The output location of the browser build has been updated from "${outputPath}" to ` +
            `"${join(outputPath, 'browser')}". ` +
            'You might need to adjust your deployment pipeline or, as an alternative, ' +
            'set outputPath.browser to "" in order to maintain the previous functionality.',
        );
      } else {
        outputPath = outputPath.replace(/\/browser\/?$/, '');
      }

      options['outputPath'] = {
        base: outputPath,
      };

      if (typeof options['resourcesOutputPath'] === 'string') {
        const media = options['resourcesOutputPath'].replaceAll('/', '');
        if (media && media !== 'media') {
          options['outputPath'] = {
            base: outputPath,

View on GitHub (pinned to bb72145f9a)

Solutions

  1. Update your deployment pipeline/CI scripts to read from <outputPath>/browser
  2. Alternatively set outputPath as an object: { "base": "dist/my-app", "browser": "" } to preserve the old flat layout
  3. Re-run the build and verify the dist output path used by deployment matches

Example fix

// before (angular.json)
"outputPath": "dist/my-app"
// after option A
"outputPath": "dist/my-app" // deploy from dist/my-app/browser
// after option B (keep old behavior)
"outputPath": { "base": "dist/my-app", "browser": "" }
Defensive patterns

Strategy: validation

Validate before calling

// before upgrading, detect outputs consumed by deploy scripts
const outputPath = angularJson.projects[proj].architect?.build?.options?.outputPath;
const isString = typeof outputPath === 'string';
const needsBrowserDir = isString && !/\/browser\/?$/.test(outputPath);
if (needsBrowserDir) console.warn(`${outputPath} will move to ${outputPath}/browser after application-builder migration`);

Prevention

When it happens

Trigger: Running ng update (use-application-builder migration) -> updateProjects -> updateBuildTarget on a project whose build target outputPath is a string not ending in '/browser' or '/browser'.

Common situations: Upgrading an Angular CLI workspace whose deploy pipeline copies files from a flat dist folder (e.g. dist/my-app) after the builder switch to @angular-devkit/build-angular:application.

Related errors


AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30). Data as JSON: /api/errors/ea6fa9d6cfefd40f. Report an issue: GitHub.