Title: Sveltekit build with adapter-cloudflare fails · Issue #9176 · getsentry/sentry-javascript · GitHub
Open Graph Title: Sveltekit build with adapter-cloudflare fails · Issue #9176 · getsentry/sentry-javascript
X Title: Sveltekit build with adapter-cloudflare fails · Issue #9176 · 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...
Mail addresses
7.69.0_@sveltejs
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/9176
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sveltekit build with adapter-cloudflare fails","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/sveltekit\r\n\r\n### SDK Version\r\n\r\n\"@sentry/sveltekit\": \"^7.73.0\",\r\n\r\n### Framework Version\r\n\r\n\"@sentry/sveltekit\": \"^7.73.0\",\r\n\r\n### Link to Sentry event\r\n\r\n_No response_\r\n\r\n### SDK Setup\r\n\r\n```js\r\n Sentry.init({\r\n dsn: SENTRY_DSN,\r\n environment: sentryEnvironment(),\r\n // We recommend adjusting this value in production, or using tracesSampler\r\n // for finer control\r\n tracesSampleRate: 1.0,\r\n\r\n // Enables bypassing browsers adblockers\r\n // CF https://docs.sentry.io/platforms/javascript/guides/sveltekit/troubleshooting/?utm_expid=.OVGA2WEyTlS_pX-EST8OfQ.0#using-the-tunnel-option\r\n tunnel: '/api/sentry-tunnel',\r\n })\r\n```\r\n\r\n### Steps to Reproduce\r\n\r\n1. Create a sveltekit project with latest Sentry\r\n \"@sveltejs/adapter-auto\": \"^2.1.0\",\r\n \"@sveltejs/adapter-cloudflare\": \"^2.3.0\",\r\n \"@sveltejs/kit\": \"^1.25.1\",\r\n \"vite\": \"^4.4.9\",\r\n \"svelte\": \"^4.2.1\",\r\n \r\n2. Install sentry\r\n3. Build with normal adapter-auto : works\r\n4. Use adapter-cloudflare\r\n5. Build : it fails with an error located in the sentry code\r\n\r\n\r\n### Expected Result\r\n\r\nBuild does not fail\r\n\r\n### Actual Result\r\n\r\n> vite build\r\n\r\n[vite] Sentry plugin setup done\r\n\r\nvite v4.4.9 building SSR bundle for production...\r\ntransforming...\r\n\"default\" is imported from external module \"svelte-autosize\" but never used in \"src/lib/components/ui/textarea/Textarea.svelte\".\r\n✓ 6107 modules transformed.\r\nrendering chunks...\r\n\r\nvite v4.4.9 building for production...\r\ntransforming...\r\n✓ 6574 modules transformed.\r\nrendering chunks...\r\ncomputing gzip size...\r\n.svelte-kit/output/client/_app/version.json 0.03 kB │ gzip: 0.05 kB\r\n.svelte-kit/output/client/vite-manifest.json 21.25 kB │ gzip: 2.06 kB\r\n\r\n...\r\n\r\n.svelte-kit/output/client/_app/immutable/entry/app.27b0d20b.js 125.59 kB │ gzip: 37.30 kB\r\n✓ built in 50.37s\r\n.svelte-kit/output/server/vite-manifest.json 13.42 kB\r\n\r\n...\r\n\r\n.svelte-kit/output/server/index.js 110.56 kB \r\n\r\nRun npm run preview to preview your production build locally.\r\n\r\n> Using @sveltejs/adapter-cloudflare\r\nGET:/[fallback] took 7ms\r\nX [ERROR] Could not resolve \"$app/stores\"\r\n\r\n ../../node_modules/.pnpm/@sentry+sveltekit@7.69.0_@sveltejs+kit@1.25.1_svelte@4.2.1/node_modules/@sentry/sveltekit/esm/client/router.js:3:33:\r\n 3 │ import { page, navigating } from '$app/stores';\r\n ╵ ~~~~~~~~~~~~~\r\n\r\n You can mark the path \"$app/stores\" as external to exclude it from the bundle, which will remove this error. \r\n\r\nerror during build:\r\nError: Build failed with 1 error:\r\n../../node_modules/.pnpm/@sentry+sveltekit@7.69.0_@sveltejs+kit@1.25.1_svelte@4.2.1/node_modules/@sentry/sveltekit/esm/client/router.js:3:33: ERROR: Could not resolve \"$app/stores\"\r\n at failureErrorWithLog (C:\\...\\Turbo\\node_modules\\.pnpm\\esbuild@0.17.19\\node_modules\\esbuild\\lib\\main.js:1636:15)\r\n at C:\\...\\Turbo\\node_modules\\.pnpm\\esbuild@0.17.19\\node_modules\\esbuild\\lib\\main.js:1048:25\r\n at C:\\...\\Turbo\\node_modules\\.pnpm\\esbuild@0.17.19\\node_modules\\esbuild\\lib\\main.js:993:52\r\n at buildResponseToResult (C:\\...\\Turbo\\node_modules\\.pnpm\\esbuild@0.17.19\\node_modules\\esbuild\\lib\\main.js:1046:7)\r\n at C:\\...\\Turbo\\node_modules\\.pnpm\\esbuild@0.17.19\\node_modules\\esbuild\\lib\\main.js:1075:16\r\n at responseCallbacks.\u003ccomputed> (C:\\...\\Turbo\\node_modules\\.pnpm\\esbuild@0.17.19\\node_modules\\esbuild\\lib\\main.js:697:9)\r\n at handleIncomingPacket (C:\\...\\Turbo\\node_modules\\.pnpm\\esbuild@0.17.19\\node_modules\\esbuild\\lib\\main.js:752:9)\r\n at Socket.readFromStdout (C:\\...\\Turbo\\node_modules\\.pnpm\\esbuild@0.17.19\\node_modules\\esbuild\\lib\\main.js:673:7)\r\n at Socket.emit (node:events:514:28)\r\n at Socket.emit (node:domain:489:12)\r\n ELIFECYCLE Command failed with exit code 1.\r\nERROR: command finished with error: command (C:\\...\\Turbo\\apps\\SvelteKitProject) pnpm run build exited (1)\r\nSvelteKitProject#build: command (C:\\...\\Turbo\\apps\\SvelteKitProject) pnpm run build exited (1)\r\n\r\n Tasks: 1 successful, 2 total\r\nCached: 0 cached, 2 total\r\n Time: 1m31.191s\r\nFailed: SvelteKitProject#build\r\n\r\n ERROR run failed: command exited (1)","author":{"url":"https://github.com/MarArMar","@type":"Person","name":"MarArMar"},"datePublished":"2023-10-04T11:57:11Z","url":"https://github.com/getsentry/sentry-javascript/issues/9176"}
| 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:89dce545-f4fa-3f68-91db-47c56239160c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D38A:282FC:4829F0:60D5D0:6B04A1B9 |
| html-safe-nonce | d77d346e27ac8d44eedc9da82a67d860f338dae8202dd8253d28795021f0433b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzhBOjI4MkZDOjQ4MjlGMDo2MEQ1RDA6NkIwNEExQjkiLCJ2aXNpdG9yX2lkIjoiODgwOTM0OTQ3MDYyNzM0MDcyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 08e0618cac097b0bfd44d3d42f94f97a59e75fffa546993034d44e81730d5db0 |
| hovercard-subject-tag | issue:1926051313 |
| 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/9176/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9480f0c20f5e4190a71a664adf72c9c98e5266c11b332c0e35ccd2e9f20dd6ee/getsentry/sentry-javascript/issues/9176 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9480f0c20f5e4190a71a664adf72c9c98e5266c11b332c0e35ccd2e9f20dd6ee/getsentry/sentry-javascript/issues/9176 |
| 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 | MarArMar |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9784b6f42e2d5eac4e394fa88cad134c0dc5b6662b4ff2787a1ed1ef5a96331d |
| 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 | 3fd14143b75b2af7b76bbd23b069867d091adfcc |
| 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