Title: @sentry/nextjs: can't read data inside next-compose-plugins · Issue #3579 · getsentry/sentry-javascript · GitHub
Open Graph Title: @sentry/nextjs: can't read data inside next-compose-plugins · Issue #3579 · getsentry/sentry-javascript
X Title: @sentry/nextjs: can't read data inside next-compose-plugins · Issue #3579 · getsentry/sentry-javascript
Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javascript/releases Provide a link to the aff...
Open Graph Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
X Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/3579
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@sentry/nextjs: can't read data inside next-compose-plugins","articleBody":"\u003c!-- Requirements: please go through this checklist before opening a new issue -->\r\n\r\n- [x] Review the documentation: https://docs.sentry.io/\r\n- [x] Search for existing issues: https://github.com/getsentry/sentry-javascript/issues\r\n- [x] Use the latest release: https://github.com/getsentry/sentry-javascript/releases\r\n- [ ] Provide a link to the affected event from your Sentry account\r\n\r\n## Package + Version\r\n\r\n- [ ] `@sentry/browser`\r\n- [ ] `@sentry/node`\r\n- [ ] `raven-js`\r\n- [ ] `raven-node` _(raven for node)_\r\n- [x] other: `@sentry/nextjs`\r\n\r\n### Version:\r\n\r\n```\r\n\"@sentry/nextjs\": \"^6.4.1\",\r\n\"next\": \"^10.2.1\",\r\n```\r\n\r\n## Description\r\n\r\nFYI: We start projects with version \u003c 10.0.0 and then we are upgrading to the latest version.\r\n\r\nPreviously we have a setting in our `next.config.js` like this.\r\n\r\n```\r\nconst withCss = require(\"@zeit/next-css\");\r\nconst withSass = require(\"@zeit/next-sass\");\r\nconst withPlugins = require(\"next-compose-plugins\");\r\nconst withImages = require(\"next-images\");\r\n\r\nmodule.exports = withPlugins([withCss, withSass, withImages], {\r\n env: {\r\n SENTRY_DSN: \"xxx\",\r\n }\r\n});\r\n```\r\n\r\nThen we change the structure like in the documentation, become like this:\r\n```\r\nconst { withSentryConfig } = require(\"@sentry/nextjs\");\r\n\r\nconst withCss = require(\"@zeit/next-css\");\r\nconst withSass = require(\"@zeit/next-sass\");\r\nconst withPlugins = require(\"next-compose-plugins\");\r\nconst withImages = require(\"next-images\");\r\n\r\nconst moduleExports = withPlugins([withCss, withSass, withImages], {\r\n env: {\r\n SENTRY_DSN: \"xxx\",\r\n }\r\n});\r\n\r\n// other codes\r\n\r\nmodule.exports = withSentryConfig(moduleExports, SentryWebpackPluginOptions);\r\n```\r\n\r\nWhen we run the app, env can't read with a struct like that. (start from this we are confused)\r\n\r\nBut, when we are changing the structure like this:\r\n```\r\nconst { withSentryConfig } = require(\"@sentry/nextjs\");\r\n\r\nconst moduleExports = {\r\n env: {\r\n SENTRY_DSN: \"xxx\",\r\n }\r\n};\r\n\r\n// other codes\r\n\r\nmodule.exports = withSentryConfig(moduleExports, SentryWebpackPluginOptions);\r\n```\r\n\r\nThe app can run fine, but the problem is we don't want to change like that because we are still using the next-compose-plugins.\r\n\r\nIs there any recommendation for us, thank you.","author":{"url":"https://github.com/Fadhilamadan","@type":"Person","name":"Fadhilamadan"},"datePublished":"2021-05-21T02:17:56Z","url":"https://github.com/getsentry/sentry-javascript/issues/3579"}
| 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:7a03dcae-b880-3635-6372-b0077f3c722c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C726:2815D1:27D07B:370E96:6B04693C |
| html-safe-nonce | 036b6e28fde13d167061f9b319364686b0dcae75749718068c614d756e208abe |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzI2OjI4MTVEMToyN0QwN0I6MzcwRTk2OjZCMDQ2OTNDIiwidmlzaXRvcl9pZCI6IjczMzQ2OTgzNjUzNzgzOTAzMzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 00b96fa9251933c698df412a4a6e69c949790a31e9bd0f17b187e31ebf791827 |
| hovercard-subject-tag | issue:897615530 |
| 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/3579/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a413e399ae3d9d85ace99988715d93b1d8dba29f362cb9c1ef5d037a0ec42680/getsentry/sentry-javascript/issues/3579 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a413e399ae3d9d85ace99988715d93b1d8dba29f362cb9c1ef5d037a0ec42680/getsentry/sentry-javascript/issues/3579 |
| og:image:alt | Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Fadhilamadan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f |
| 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 | ca4d07a7cef4e4b75f821dc25e7300d80c1450a9 |
| 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