You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npm run build
> [email protected] build
> next build
▲ Next.js 14.2.8
- Experiments (use with caution):
· swcPlugins
· instrumentationHook
Creating an optimized production build ...
Failed to compile.
./src/app/sentry-example-page/page.tsx
Module parse failed: Unexpected token (59:32)
File was processed with these loaders:
* ./node_modules/@sentry/nextjs/build/cjs/config/loaders/wrappingLoader.js
* ./node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js
* ./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js
* ./node_modules/unplugin/dist/webpack/loaders/transform.js
You may need an additional loader to handle the result of these loaders.
| /*#__PURE__*/ _jsx(SuperJSONComponent, {
| props: serialize({
> data-sentry-element: "ClientPage",
| data-sentry-source-file: "page.tsx"
| }),
Import trace for requested module:
./src/app/sentry-example-page/page.tsx
> Build failed because of webpack errors
import{withSentryConfig}from"@sentry/nextjs";/** @type {import("next").NextConfig} */constnextConfig={experimental: {swcPlugins: [["next-superjson-plugin",{excluded: ["data-sentry-element","data-sentry-source-file"]}]]}};exportdefaultwithSentryConfig(nextConfig,{// For all available options, see:// https://github.com/getsentry/sentry-webpack-plugin#optionsorg: "my-org",project: "javascript-nextjs",// Only print logs for uploading source maps in CIsilent: !process.env.CI,// For all available options, see:// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/// Upload a larger set of source maps for prettier stack traces (increases build time)widenClientFileUpload: true,// Automatically annotate React components to show their full name in breadcrumbs and session replayreactComponentAnnotation: {enabled: true},// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.// This can increase your server load as well as your hosting bill.// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-// side errors will fail.tunnelRoute: "/monitoring",// Hides source maps from generated client bundleshideSourceMaps: true,// Automatically tree-shake Sentry logger statements to reduce bundle sizedisableLogger: true,// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)// See the following for more information:// https://docs.sentry.io/product/crons/// https://vercel.com/docs/cron-jobsautomaticVercelMonitors: true});
Additional context
No response
The text was updated successfully, but these errors were encountered:
Verify Next.js canary release
Describe the bug
Installing next-superjson-plugin for next.js plus sentry (https://sentry.io/) breaks the next.js build.
git clone https://github.com/Finkes/sentry-superjson-error
npm install
npm run build
Expected behavior
the build should work
Reproduction link
https://github.com/Finkes/sentry-superjson-error
Version
latest
Config
Additional context
No response
The text was updated successfully, but these errors were encountered: