Title: SvelteKit Cloudflare adapter failing · Issue #8291 · getsentry/sentry-javascript · GitHub
Open Graph Title: SvelteKit Cloudflare adapter failing · Issue #8291 · getsentry/sentry-javascript
X Title: SvelteKit Cloudflare adapter failing · Issue #8291 · 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/8291
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SvelteKit Cloudflare adapter failing","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/sveltekit\n\n### SDK Version\n\n7.54.0\n\n### Framework Version\n\n@sveltejs/kit == 1.20.0\n\n### Link to Sentry event\n\n_No response_\n\n### SDK Setup\n\nhooks.client.ts...\r\n```typescript\r\nSentry.init({\r\n\tdsn: config.sentryDSN,\r\n\tenvironment: config.env,\r\n\ttracesSampleRate: 1,\r\n\treplaysSessionSampleRate: 0.1,\r\n\treplaysOnErrorSampleRate: 1,\r\n\tintegrations: [new Sentry.Replay()]\r\n});\r\n```\r\n\r\nhooks.server.ts\r\n```typescript\r\nSentry.init({\r\n\tdsn: config.sentryDSN,\r\n\tenvironment: config.env,\r\n\ttracesSampleRate: 1\r\n});\r\n```\n\n### Steps to Reproduce\n\n1. manually setup the sveltekit + sentry integration\r\n2. verify it's working locally\r\n3. install adapter-cloud flare and update svelte.config.ts according to [sveltekit documentation](https://kit.svelte.dev/docs/adapter-cloudflare#usage) -- partial example provided below.\r\n4. deploy to cloudflare (can't easily give you a way to reproduce this portion, but let me know if I can additional details\r\n\r\nsample svelte.config.js\r\n```javascript\r\nimport adapter from '@sveltejs/adapter-cloudflare';\r\nimport { vitePreprocess } from '@sveltejs/kit/vite';\r\n\r\n/** @type {import('@sveltejs/kit').Config} */\r\nconst config = {\r\n\t// Consult https://kit.svelte.dev/docs/integrations#preprocessors\r\n\t// for more information about preprocessors\r\n\tpreprocess: vitePreprocess(),\r\n\tkit: {\r\n\t\tadapter: adapter()\r\n};\r\n\r\nexport default config;\r\n```\n\n### Expected Result\n\nSuccessful build & deploy from cloudflare pages\n\n### Actual Result\n\n```\r\n16:37:00.142 | > Using @sveltejs/adapter-cloudflare\r\n-- | --\r\n16:37:00.627 | ✘ [ERROR] Could not resolve \"$app/stores\"\r\n16:37:00.628 | \r\n16:37:00.628 | node_modules/.pnpm/@sentry+sveltekit@7.54.0_@sveltejs+kit@1.20.0_svelte@3.59.1/node_modules/@sentry/sveltekit/esm/client/router.js:3:33:\r\n16:37:00.628 | 3 │ import { page, navigating } from '$app/stores';\r\n16:37:00.628 | ╵ ~~~~~~~~~~~~~\r\n16:37:00.628 | \r\n16:37:00.629 | You can mark the path \"$app/stores\" as external to exclude it from the bundle, which will remove this error.\r\n16:37:00.629 | \r\n16:37:01.102 | error during build:\r\n16:37:01.103 | Error: Build failed with 1 error:\r\n16:37:01.104 | node_modules/.pnpm/@sentry+sveltekit@7.54.0_@sveltejs+kit@1.20.0_svelte@3.59.1/node_modules/@sentry/sveltekit/esm/client/router.js:3:33: ERROR: Could not resolve \"$app/stores\"\r\n```","author":{"url":"https://github.com/lucasnad27","@type":"Person","name":"lucasnad27"},"datePublished":"2023-06-05T22:50:45Z","url":"https://github.com/getsentry/sentry-javascript/issues/8291"}
| 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:ce73cd80-9af3-1ad9-fa96-225a91f82a09 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA80:C727A:296D065:357F95C:6B0402E1 |
| html-safe-nonce | fc870af7026a40e97a41dad7ee85e77d4bc8ff0fb52e739f7513e0b75035a3ce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTgwOkM3MjdBOjI5NkQwNjU6MzU3Rjk1Qzo2QjA0MDJFMSIsInZpc2l0b3JfaWQiOiI2MjAyMDExNDc4MjAwMTU2ODk4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5860f7a8c6bfa56f4e0918e450ee58eb053a3c5966e2671c373f570b4d6b3bdc |
| hovercard-subject-tag | issue:1742741366 |
| 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/8291/issue_layout |
| twitter:image | https://opengraph.githubassets.com/29a2323ef3691111e8477b4ab505c2f41611fc822531ccc21aea2b1ff0ef79e9/getsentry/sentry-javascript/issues/8291 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/29a2323ef3691111e8477b4ab505c2f41611fc822531ccc21aea2b1ff0ef79e9/getsentry/sentry-javascript/issues/8291 |
| 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 | lucasnad27 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| 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