Title: Build Error in SvelteKit with Cloudflare Pages Following Cloudflare SvelteKit Framework Guide · Issue #13976 · getsentry/sentry-javascript · GitHub
Open Graph Title: Build Error in SvelteKit with Cloudflare Pages Following Cloudflare SvelteKit Framework Guide · Issue #13976 · getsentry/sentry-javascript
X Title: Build Error in SvelteKit with Cloudflare Pages Following Cloudflare SvelteKit Framework Guide · Issue #13976 · 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/13976
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Build Error in SvelteKit with Cloudflare Pages Following Cloudflare SvelteKit Framework Guide","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/cloudflare\n\n### SDK Version\n\n8.34.0\n\n### Framework Version\n\nSvelteKit 2.7.0\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\n```js\nimport { sequence } from \"@sveltejs/kit/hooks\";\nimport { handleErrorWithSentry, sentryHandle } from \"@sentry/sveltekit\";\nimport * as Sentry from \"@sentry/cloudflare\";\n\nconst handleInitSentry = ({ event, resolve }) => {\n return event.platform\n ? Sentry.wrapRequestHandler(\n {\n options: {\n dsn: 'YOUR_SENTRY_DSN',\n tracesSampleRate: 1.0,\n },\n request: event.request,\n context: event.platform.ctx,\n },\n () => resolve(event)\n )\n : resolve(event);\n};\n\nexport const handle = sequence(handleInitSentry, sentryHandle());\n```\n\n### Steps to Reproduce\n\n1. npm create svelte@latest my-app\n2. npm i -D @sveltejs/adapter-cloudflare\n3. Follow instructions on [Cloudflare Sveltekit Framework Guide](https://docs.sentry.io/platforms/javascript/guides/cloudflare/frameworks/sveltekit/)\n\n\n### Expected Result\n\nAccording to documentation I should be able to build the project without error.\n\n### Actual Result\n\n> Using @sveltejs/adapter-cloudflare\n✘ [ERROR] Could not resolve \"$app/stores\"\n\n node_modules/@sentry/sveltekit/build/esm/client/browserTracingIntegration.js:1:33:\n 1 │ import { page, navigating } from '$app/stores';\n ╵ ~~~~~~~~~~~~~\n\n You can mark the path \"$app/stores\" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.\n\n\nerror during build:\n```\nError: Bundling with esbuild failed with 1 error\n at adapt (file:///home/onur/Documents/dev/sentry/test/node_modules/@sveltejs/adapter-cloudflare/index.js:140:11)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async adapt (file:///home/onur/Documents/dev/sentry/test/node_modules/@sveltejs/kit/src/core/adapt/index.js:38:2)\n at async finalise (file:///home/onur/Documents/dev/sentry/test/node_modules/@sveltejs/kit/src/exports/vite/index.js:891:7)\n at async Object.handler (file:///home/onur/Documents/dev/sentry/test/node_modules/@sveltejs/kit/src/exports/vite/index.js:921:5)\n at async PluginDriver.hookParallel (file:///home/onur/Documents/dev/sentry/test/node_modules/rollup/dist/es/shared/node-entry.js:20652:17)\n at async Object.close (file:///home/onur/Documents/dev/sentry/test/node_modules/rollup/dist/es/shared/node-entry.js:21627:13)\n at async build (file:///home/onur/Documents/dev/sentry/test/node_modules/vite/dist/node/chunks/dep-Cyk9bIUq.js:65455:17)\n at async CAC.\u003canonymous> (file:///home/onur/Documents/dev/sentry/test/node_modules/vite/dist/node/cli.js:828:5)\n```","author":{"url":"https://github.com/onursoyer","@type":"Person","name":"onursoyer"},"datePublished":"2024-10-15T00:14:35Z","url":"https://github.com/getsentry/sentry-javascript/issues/13976"}
| 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:ddcb4d1f-ed8b-0b4e-3597-47ef3306249e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B886:2C4C9:40D61DB:564B347:6B0401E6 |
| html-safe-nonce | 146bae2149473e71badc58d6491d3cae5a504e48389d61b8a345a0c45a783e69 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODg2OjJDNEM5OjQwRDYxREI6NTY0QjM0Nzo2QjA0MDFFNiIsInZpc2l0b3JfaWQiOiIyNTg0MjI5NDg0MzA2MTA5MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d274155231c87837eb8c99d46693723a3c36e59a07048fe38615c5d895a731ea |
| hovercard-subject-tag | issue:2587328395 |
| 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/13976/issue_layout |
| twitter:image | https://opengraph.githubassets.com/285f7684433d370253ed485d52c806a3fd4c91c241e9463381ffc1224eb13d56/getsentry/sentry-javascript/issues/13976 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/285f7684433d370253ed485d52c806a3fd4c91c241e9463381ffc1224eb13d56/getsentry/sentry-javascript/issues/13976 |
| 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 | onursoyer |
| 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