diff --git a/docs/platforms/javascript/common/troubleshooting/index.mdx b/docs/platforms/javascript/common/troubleshooting/index.mdx index 0f0a042dfbfdc..248d1b1c16c76 100644 --- a/docs/platforms/javascript/common/troubleshooting/index.mdx +++ b/docs/platforms/javascript/common/troubleshooting/index.mdx @@ -18,6 +18,14 @@ If you set up the Sentry SDK and it's not sending any data to Sentry: - Set `debug: true` in the `Sentry.init()` options and observe your console output when you start your application. The SDK may tell you why it is not sending any data. - Check the [Stats](https://sentry.io/orgredirect/organizations/:orgslug/stats/) and [Suscription](https://sentry.io/orgredirect/organizations/:orgslug/settings/billing/overview/) pages in Sentry. You may have ran out of quota. + + - Check that you didn't set `sideEffects: false` in your `package.json`. + Setting `sideEffects` to false in your `package.json` will cause Next.js to + tree shake the SDK code too agressively - effectively deleting any + `Sentry.init()` calls. Setting `sideEffects: false` is incorrect when you are + using the Sentry SDK. + + @@ -448,7 +456,10 @@ shamefully-hoist=true ``` - **Note**: While `shamefully-hoist=true` usually isn't the ideal solution from a dependency management perspective, it's sometimes necessary for compatibility with certain packages that expect Node.js module resolution behavior similar to npm or yarn. + **Note**: While `shamefully-hoist=true` usually isn't the ideal solution from + a dependency management perspective, it's sometimes necessary for + compatibility with certain packages that expect Node.js module resolution + behavior similar to npm or yarn.