Title: Next 13 + App Router + static export results in a build error (Specified "rewrites" cannot be used with "output: export") · Issue #8285 · getsentry/sentry-javascript · GitHub
Open Graph Title: Next 13 + App Router + static export results in a build error (Specified "rewrites" cannot be used with "output: export") · Issue #8285 · getsentry/sentry-javascript
X Title: Next 13 + App Router + static export results in a build error (Specified "rewrites" cannot be used with "output: export") · Issue #8285 · getsentry/sentry-javascript
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/...
Open Graph 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 th...
X 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 th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/8285
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Next 13 + App Router + static export results in a build error (Specified \"rewrites\" cannot be used with \"output: export\")","articleBody":"### Is there an existing issue for this?\r\n\r\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\r\n- [X] I have reviewed the documentation https://docs.sentry.io/\r\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\r\n\r\n### How do you use Sentry?\r\n\r\nSentry Saas (sentry.io)\r\n\r\n### Which SDK are you using?\r\n\r\n@sentry/nextjs\r\n\r\n### SDK Version\r\n\r\n7.54.0\r\n\r\n### Framework Version\r\n\r\nNext 13.4.4\r\n\r\n### Link to Sentry event\r\n\r\n_No response_\r\n\r\n### SDK Setup\r\n\r\nI've used the wizard to create the sentry.*.config.js files. My next.config.js is:\r\n`{\r\n images: {\r\n unoptimized: true\r\n },\r\n experimental: {\r\n externalDir: true\r\n },\r\n output: 'export',\r\n reactStrictMode: true\r\n }`\r\n\r\n### Steps to Reproduce\r\n\r\nI'm using the Next with the App Router in a static configuration (`output: 'export'` in next.config.js).\r\nWhen attempting to build the app, I'm getting:\r\n\r\n`> Build error occurred\r\nError: Specified \"rewrites\" cannot be used with \"output: export\". See more info here: https://nextjs.org/docs/messages/export-no-custom-routes\r\n at assignDefaults (/Users/eran/Dev/Butterfly/Website/node_modules/.pnpm/next@13.4.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/config.js:218:19)\r\n at loadConfig (/Users/eran/Dev/Butterfly/Website/node_modules/.pnpm/next@13.4.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/config.js:550:32)\r\n at async Span.traceAsyncFn (/Users/eran/Dev/Butterfly/Website/node_modules/.pnpm/next@13.4.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/trace/trace.js:103:20)\r\n at async /Users/eran/Dev/Butterfly/Website/node_modules/.pnpm/next@13.4.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/build/index.js:150:28\r\n at async Span.traceAsyncFn (/Users/eran/Dev/Butterfly/Website/node_modules/.pnpm/next@13.4.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/trace/trace.js:103:20)\r\n at async build (/Users/eran/Dev/Butterfly/Website/node_modules/.pnpm/next@13.4.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/build/index.js:145:29)`\r\n\r\nThis error started following the integration of the Sentry SDK. This error is suppressed when I remove the `output: 'export'` option.\r\n\r\n### Expected Result\r\n\r\nNo errors when building a static website.\r\n\r\n### Actual Result\r\n\r\nN/A","author":{"url":"https://github.com/metalmarker","@type":"Person","name":"metalmarker"},"datePublished":"2023-06-02T20:52:52Z","url":"https://github.com/getsentry/sentry-javascript/issues/8285"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ca296970-a919-9652-af62-ca9694cafc68 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B56C:FFCCA:854622:B0803D:6B04ECDC |
| html-safe-nonce | 7ec999ef23aba7e3df70e125f867c74a22da1978ffa0623a44f5368015b0b7be |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTZDOkZGQ0NBOjg1NDYyMjpCMDgwM0Q6NkIwNEVDREMiLCJ2aXNpdG9yX2lkIjoiNjY3MTQ3ODIzODYwODY4MjIwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f7469bfd075b2a9a383dab3839adbf1753d120ad052b2d0aa2f1faea2890de3a |
| hovercard-subject-tag | issue:1738814329 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/8285/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dcd4d442e578708cedeb03417274a8ed2985090c2c47f28fef82812392444dcc/getsentry/sentry-javascript/issues/8285 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dcd4d442e578708cedeb03417274a8ed2985090c2c47f28fef82812392444dcc/getsentry/sentry-javascript/issues/8285 |
| og:image:alt | 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 th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | metalmarker |
| hostname | github.com |
| expected-hostname | github.com |
| None | f3851aad500d8e8dce736722ddc6fa9596e17d9fce3c53581eba968664c0bc32 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e29c922455fd8137f27e1cfcdf6a1e8b920b1926 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width