Skip to content

Commit

Permalink
Merge branch 'master' into cg/troubleshooting-next-oom
Browse files Browse the repository at this point in the history
  • Loading branch information
chargome authored Dec 11, 2024
2 parents 06b3e5b + 887b408 commit d9d939c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions docs/platforms/javascript/common/troubleshooting/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,10 @@ As a workaround, create or modify `.npmrc` in your project root:
shamefully-hoist=true
```
<Alert level="warning">
**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.
</Alert>
{" "}
<Alert level="warning">
**Note**: While `shamefully-hoist=true` usually isn't the ideal solution from
Expand Down Expand Up @@ -562,4 +566,34 @@ shamefully-hoist=true
</Expandable>
</PlatformSection>
<PlatformSection supported={['javascript.nextjs']}>
<Expandable permalink title="Using the Sentry Next SDK in a Nx monorepo (using `@nx/next`)">
To set up Sentry's Next.js SDK in an Nx monorepo context, consider the following setup:
```js {filename:next.config.js}
const nextConfig = {
// ...
};

const plugins = [
// Your plugins excluding withNx
];

module.exports = async (phase, context) => {
let updatedConfig = plugins.reduce((acc, fn) => fn(acc), nextConfig);

// Apply the async function that `withNx` returns.
updatedConfig = await withNx(updatedConfig)(phase, context);

return updatedConfig;
};

// The Sentry plugin should always be applied last
const { withSentryConfig } = require('@sentry/nextjs');
module.exports = withSentryConfig(module.exports)
```
</Expandable>
</PlatformSection>
If you need additional help, you can [ask on GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose). Customers on a paid plan may also contact support.

0 comments on commit d9d939c

Please sign in to comment.