Title: Sentry causes Next.js standalone to copy entire repo into build output · Issue #18004 · getsentry/sentry-javascript · GitHub
Open Graph Title: Sentry causes Next.js standalone to copy entire repo into build output · Issue #18004 · getsentry/sentry-javascript
X Title: Sentry causes Next.js standalone to copy entire repo into build output · Issue #18004 · getsentry/sentry-javascript
Description: Official Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub.
Open Graph Description: Official Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub.
X Description: Official Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub.
Opengraph URL: https://github.com/getsentry/sentry-javascript
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sentry causes Next.js standalone to copy entire repo into build output","articleBody":"### Is there an existing issue for this?\n\n- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [x] I have reviewed the documentation https://docs.sentry.io/\n- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/nextjs\n\n### SDK Version\n\n10.21.0\n\n### Framework Version\n\nNext 16.0.0\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\nhttps://github.com/BTOdell/sentry-nextjs-standalone-bug\n\n### Steps to Reproduce\n\n1. Set Next.js build output to 'standalone'\n2. Import Sentry SDK from `instrumentation.ts` (don't even need to configure Sentry in `next.config.ts`)\n\n\n### Expected Result\n\nNext.js standalone build output should only contain the minimal files needed to run the app\n\n### Actual Result\n\nStandalone output directory contains copy of the entire repository / project\n\n### Additional Context\n\nConfirmed that this bug does not happen with Next 15.4.4 with `@sentry/nextjs` v9 nor v10.\nLikely a compatibility issue with Next 16?\n\nMay be related to #18001, but I'm not getting a build error - just incorrect build output.\n\n\u003csub>Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.\u003c/sub>","author":{"url":"https://github.com/BTOdell","@type":"Person","name":"BTOdell"},"datePublished":"2025-10-22T20:10:36Z","url":"https://github.com/getsentry/sentry-javascript/issues/18004"}
| 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 | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:b0e8b3dd-9ee4-6add-ce75-c158c516601e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DBEC:28EBDB:757BB5:9B8B20:6B04E892 |
| html-safe-nonce | 0955496f2583561c1cb5b0931357265a81927f139c4f26bd8516a06ee2140a2b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQkVDOjI4RUJEQjo3NTdCQjU6OUI4QjIwOjZCMDRFODkyIiwidmlzaXRvcl9pZCI6IjE2MDU1NjQyMTQxOTI0MzMyOTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2dd3d47f29558a23c45bde229a886c40beeab66f67dc0f1f6b03f3f530d93548 |
| hovercard-subject-tag | repository:3328572 |
| 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/getsentry/sentry-javascript/issues/18004 |
| twitter:image | https://repository-images.githubusercontent.com/3328572/1b73c77d-6488-4ece-9e12-e61d9eb2ac2b |
| twitter:card | summary_large_image |
| og:image | https://repository-images.githubusercontent.com/3328572/1b73c77d-6488-4ece-9e12-e61d9eb2ac2b |
| og:image:alt | Official Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub. |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f3851aad500d8e8dce736722ddc6fa9596e17d9fce3c53581eba968664c0bc32 |
| turbo-cache-control | no-cache |
| 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