-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Sveltekit build with adapter-cloudflare fails #9176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Replacing again the adapter-cloudflare with adapter-auto : build works again But I am deploying on cloudflare so this blocks all use of Sentry for me. |
I removed sentry, ran the build again with adapter-cloudflare, it works again Totally looks like it s an incompatibility of sentry with the adapter-cloudflare Completely blocks integration of Sentry into production |
Hi @MarArMar thanks for writing in! As of our documentation, we currently do not guarantee support for the cloudflare adapter. This is especially due to the cloudflare workers runtime not being Node-API compatible. It's a similar story to Vercel's Edge runtime (tracking in #9107) which we're likely going to tackle before supporting other runtimes. The good news though is that we already created the necessary basis - a runtime-agnostic server client for the SDK (#8693). I'm going to close this issue because it's a duplicate of #8291 and we're already aware of it. Please lmk if you think this needs reopening. Otherwise, feel free to comment in #8921. Thanks! :) |
😥 |
Looks like #8693 is closed |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/sveltekit
SDK Version
"@sentry/sveltekit": "^7.73.0",
Framework Version
"@sentry/sveltekit": "^7.73.0",
Link to Sentry event
No response
SDK Setup
Steps to Reproduce
Create a sveltekit project with latest Sentry
"@sveltejs/adapter-auto": "^2.1.0",
"@sveltejs/adapter-cloudflare": "^2.3.0",
"@sveltejs/kit": "^1.25.1",
"vite": "^4.4.9",
"svelte": "^4.2.1",
Install sentry
Build with normal adapter-auto : works
Use adapter-cloudflare
Build : it fails with an error located in the sentry code
Expected Result
Build does not fail
Actual Result
[vite] Sentry plugin setup done
vite v4.4.9 building SSR bundle for production...
transforming...
"default" is imported from external module "svelte-autosize" but never used in "src/lib/components/ui/textarea/Textarea.svelte".
✓ 6107 modules transformed.
rendering chunks...
vite v4.4.9 building for production...
transforming...
✓ 6574 modules transformed.
rendering chunks...
computing gzip size...
.svelte-kit/output/client/_app/version.json 0.03 kB │ gzip: 0.05 kB
.svelte-kit/output/client/vite-manifest.json 21.25 kB │ gzip: 2.06 kB
...
.svelte-kit/output/client/_app/immutable/entry/app.27b0d20b.js 125.59 kB │ gzip: 37.30 kB
✓ built in 50.37s
.svelte-kit/output/server/vite-manifest.json 13.42 kB
...
.svelte-kit/output/server/index.js 110.56 kB
Run npm run preview to preview your production build locally.
You can mark the path "$app/stores" as external to exclude it from the bundle, which will remove this error.
error during build:
Error: Build failed with 1 error:
../../node_modules/.pnpm/@sentry+sveltekit@7.69.0_@sveltejs[email protected][email protected]/node_modules/@sentry/sveltekit/esm/client/router.js:3:33: ERROR: Could not resolve "$app/stores"
at failureErrorWithLog (C:...\Turbo\node_modules.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1636:15)
at C:...\Turbo\node_modules.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1048:25
at C:...\Turbo\node_modules.pnpm\[email protected]\node_modules\esbuild\lib\main.js:993:52
at buildResponseToResult (C:...\Turbo\node_modules.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1046:7)
at C:...\Turbo\node_modules.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1075:16
at responseCallbacks. (C:...\Turbo\node_modules.pnpm\[email protected]\node_modules\esbuild\lib\main.js:697:9)
at handleIncomingPacket (C:...\Turbo\node_modules.pnpm\[email protected]\node_modules\esbuild\lib\main.js:752:9)
at Socket.readFromStdout (C:...\Turbo\node_modules.pnpm\[email protected]\node_modules\esbuild\lib\main.js:673:7)
at Socket.emit (node:events:514:28)
at Socket.emit (node:domain:489:12)
ELIFECYCLE Command failed with exit code 1.
ERROR: command finished with error: command (C:...\Turbo\apps\SvelteKitProject) pnpm run build exited (1)
SvelteKitProject#build: command (C:...\Turbo\apps\SvelteKitProject) pnpm run build exited (1)
Tasks: 1 successful, 2 total
Cached: 0 cached, 2 total
Time: 1m31.191s
Failed: SvelteKitProject#build
ERROR run failed: command exited (1)
The text was updated successfully, but these errors were encountered: