Sentry Webpack Plugin fails with no useful output

Hi there.

I’m dealing with a very frustrating issue around the Sentry Webpack Plugin.

Weirdly enough, I managed to get this working a couple months ago and never committed/stashed my changes back then.

This is on an on premise setup with Sentry 9.0.0.

Essentially I’m trying to setup the SentryWebpackPlugin. This is what my config looks like:

new SentryWebpackPlugin({
  include: ["public", "src"],
  ignore: ["node_modules"],

The webpack setup works fine otherwise, builds everything with no problems.

SENTRY_AUTH_TOKEN, SENTRY_URL and SENTRY_PROJECT are defined via env vars. They are captured by the webpack environment (I checked by logging process.env).

The sentry CLI also works fine with these same env vars:

> npx @sentry/cli info
Sentry Server:
Default Organization: -
Default Project: project-name

Authentication Info:
  Method: Auth Token
    - project:read
    - project:releases
    - org:read

Essentially what happens is that whenever I run my build it just fails with no actionable feedback:

[WEBPACK] Mode set to production
[WEBPACK] Finished building server within 10.626 seconds
[WEBPACK] Moved Server bundle out of public folder.
[WEBPACK] Mode set to production
[WEBPACK] Moved Client manifest out of public folder.
[WEBPACK] Build failed after 35.061 seconds
[WEBPACK] Errors building client

npm ERR! errno 1

I tried running it with validate set to true and I get no validation errors. I tried running it with debug set to true, and all I see are the loaders/entries debug messages which seem fine. I tried setting an errorHandler function which just logs the error and I see nothing being logged at all.

As I mentioned before, I’ve had this working before and I believe all the versions of Sentry’s modules and the on premise setup we’re using were the same.

I’m probably missing something extremely obvious but I really can’t figure out what.