Commit 2f2d099
authored
fix(nextjs): Add
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.sentry-cli existence check for enabling webpack plugin (#4311)1 parent 539b026 commit 2f2d099
1 file changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
68 | 76 | | |
69 | 77 | | |
70 | 78 | | |
| |||
296 | 304 | | |
297 | 305 | | |
298 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
0 commit comments