"Build failed because of webpack errors" when using client code in NextJS React-App #14237
Closed
3 tasks done
Labels
Package: nextjs
Issues related to the Sentry Nextjs SDK
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
8.37.1
Framework Version
Next.js 15.0.1
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
Create a new React-App with NextJS:
npx create-next-app@latest
Add following code on the top of layout.tsx and page.tsx:
This is the step that causes the error, but I need everything to be client only.
Now you can set up sentry as described in the documentation. I tried the wizard, as well as this: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
npx @sentry/wizard@latest -i nextjs
(I said no to proxiing the requests).
Expected Result
No error when building.
Actual Result
It uploads the sourcemaps, but exits with following error log:
The text was updated successfully, but these errors were encountered: