getsentry / sentry-javascript-bundler-plugins

JavaScript Bundler Plugins for Sentry
https://sentry.io
BSD 3-Clause "New" or "Revised" License
131 stars 34 forks source link

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

Open rodolfoBee opened 2 months ago

rodolfoBee commented 2 months ago

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/source@0.0.0 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

lforst commented 2 months ago

Reopening because the plugins doesn't do anything now