Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type mismatch with standard @angular-devkit/build-angular:dev-server referencing custom @angular-builders/custom-esbuild:application #1901

Open
qwenger opened this issue Jan 29, 2025 · 0 comments

Comments

@qwenger
Copy link

qwenger commented Jan 29, 2025

Describe the Bug

I recently upgraded an Angular v16 project to v19, switching to the application backend in the process. Moving away from Webpack plugins in favor of esbuild plugins, I replaced the default builder @angular-devkit/build-angular:application with @angular-builders/custom-esbuild:application in the build architect target of angular.json.
If I keep the default builder @angular-devkit/build-angular:dev-server for the target serve (with "buildTarget": "myproject:build:development"), I get the error

An unhandled exception occurred: The "paths[1]" argument must be of type string. Received an instance of Object

If instead I also switch it to @angular-builders/custom-esbuild:dev-server (which I have no real reason for, since I don't set up any custom middleware/...), then it works.

Minimal Reproduction

Any project with a build and a serve targets, where build uses custom-esbuild but serve doesn't.

{
  ...
      "architect": {
        "build": {
          "builder": "@angular-builders/custom-esbuild:application",
          ...
        },
        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "configurations": {
            "production": {
              "buildTarget": "myproject:build:production"
            },
            "development": {
              "buildTarget": "myproject:build:development"
            }
          },
          "defaultConfiguration": "development"
        },
        ...
      },
  ...
}

Expected Behavior

I'm not sure whether that's expected behavior. If it's not, I'd expect the server to run without error.

Environment


Libs
- @angular/core version: 19.1.3
- @angular-devkit/build-angular version: 19.1.4
- @angular-builders/custom-esbuild version: 19.0.0

For Tooling issues:
- Node version: 22.13.1
- Platform: Linux with BusyBox under WSL2+Docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant