-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
8.30.0
Framework Version
Next 13.4.7
Link to Sentry event
No response
Reproduction Example/SDK Setup
I have the following versions:
- Next 13.4.7 (but it also fails with 12.3.1)
- Sentry 8.30.0
- React 18.3.1
If I add the withSentryConfig
to NextJS, such as this:
withSentryConfig(configWithPlugins, {
// private configs (org, project, token)
hideSourceMaps: true,
disableLogger: true,
});
I get an error when building:
> Build error occurred
TypeError: Cannot destructure property 'sentryWebpackPlugin' of 'utils.loadModule(...)' as it is undefined.
at Object.newWebpackFunction [as webpack] (/Users/project/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sentry/nextjs/build/cjs/config/webpack.js:324:15)
at getBaseWebpackConfig (/Users/project/node_modules/.pnpm/[email protected]_37z3we5wden4rzgrojygioj2rq/node_modules/next/dist/build/webpack-config.js:2113:32)
at async Promise.all (index 1)
at async Span.traceAsyncFn (/Users/project/node_modules/.pnpm/[email protected]_37z3we5wden4rzgrojygioj2rq/node_modules/next/dist/trace/trace.js:103:20)
at async webpackBuildImpl (/Users/project/node_modules/.pnpm/[email protected]_37z3we5wden4rzgrojygioj2rq/node_modules/next/dist/build/webpack-build/impl.js:133:21)
at async webpackBuild (/Users/project/node_modules/.pnpm/[email protected]_37z3we5wden4rzgrojygioj2rq/node_modules/next/dist/build/webpack-build/index.js:137:16)
at async /Users/project/node_modules/.pnpm/[email protected]_37z3we5wden4rzgrojygioj2rq/node_modules/next/dist/build/index.js:558:123
at async Span.traceAsyncFn (/Users/project/node_modules/.pnpm/[email protected]_37z3we5wden4rzgrojygioj2rq/node_modules/next/dist/trace/trace.js:103:20)
at async build (/Users/project/node_modules/.pnpm/[email protected]_37z3we5wden4rzgrojygioj2rq/node_modules/next/dist/build/index.js:145:29)
Steps to Reproduce
- Simple app with the versions I defined above
- If I add SentryWithConfig, it fails
- Otherwise, it does not
Expected Result
It succeeds the build
Actual Result
It fails the build with the error above
ibufu
Metadata
Metadata
Assignees
Labels
Projects
Status
No status