Skip to content

esbuild plugin causing error in Nx Angular CLI (angular 17) #554

@rodolfoBee

Description

@rodolfoBee

Steps to Reproduce

  1. Download repro:
    angularBuildError.zip
  2. Update org, project and token in apps/project.json
  3. npm install
  4. npm run build

This will run a nx build

Expected Result

The application is build and source maps are uploaded to Sentry.

Actual Result

> @sentry-test/[email protected] build
> nx build
> nx run sentry-test:build:production

Application bundle generation failed. [0.144 seconds]
✘ [ERROR] Plugin at index 2 is missing a name
    .../angularBuildError/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:1228:12:
      1228 │       throw new Error(`Plugin at index ${i} is missing a name`);
           ╵             ^

    at handlePlugins (.../angularBuildError/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:1228:13)

———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
 NX   Ran target build for project sentry-test (3s)
   ✖  1/1 failed
   ✔  0/1 succeeded [0 read from cache]

Removing the plugin no longer causes the issue.

Similar to issue #483

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working
    No fields configured for issues without a type.

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions