Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nextjs): Add
sentry-cli
existence check for enabling webpack pl…
…ugin (#4311) Our nextjs SDK uses `sentry-cli` (by way of `SentryWebpackPlugin` and `@sentry/cli`) to upload sourcemaps. Because binaries (like the `sentry-cli` executable) need to be compiled differently for different OSs and architectures, `@sentry/cli` uses a post-install script to download the correct one as part of its install process, rather than ship with all possible binaries at once. Of course, this goes awry if the post-install script isn't run, which is exactly what happens when `@sentry/cli` is installed with the `--ignore-scripts` option. The resulting missing binary then causes errors which bubble up to and through our SDK to the nextjs build process, which promptly crashes. This fixes that by checking to make sure they binary has been downloaded before enabling `SentryWebpackPlugin`. Fixes getsentry/sentry-cli#1085.
- Loading branch information