Problem Statement
I installed the @sentry/astro integration in my Astro Project:
import{defineConfig}from"astro/config";importcloudflarefrom"@astrojs/cloudflare";importsentryfrom"@sentry/astro";exportdefaultdefineConfig({output: "server",experimental: {actions: true,},adapter: cloudflare({}),integrations: [sentry({dsn: "https://18aba3b773c3ef1891e719e73a311ec4@o4505279164252160.ingest.us.sentry.io/4507712395214848",sourceMapsUploadOptions: {project: "pwa-astro",authToken: import.process.env.SENTRY_AUTH_TOKEN,},}),],});But on build I receive this error:
11:16:47 [ERROR] [vite] x Build failed in 1.49s
[commonjs--resolver] [plugin vite:resolve] Cannot bundle Node.js built-in "node:http" imported from "node_modules/@sentry/node/build/esm/integrations/spotlight.js". Consider disabling ssr.noExternal or remove the built-in dependency.
So I extendet my astro config:
vite: {ssr: {external: ["node:http"]},},But then I get the next error:
[commonjs--resolver] [plugin vite:resolve] Cannot bundle Node.js built-in "node:fs" imported from "node_modules/@sentry/node/build/esm/integrations/contextlines.js". Consider disabling ssr.noExternal or remove the built-in dependency.
Solution Brainstorm
Cloudflare provides a sentry plugin: https://developers.cloudflare.com/pages/functions/plugins/sentry/
Is it possible that to use this plugin to make the Sentry/Astro integration compatible with CF Pages?
Maybe releated to: #12620
Problem Statement
I installed the
@sentry/astrointegration in my Astro Project:But on build I receive this error:
So I extendet my astro config:
But then I get the next error:
Solution Brainstorm
Cloudflare provides a sentry plugin: https://developers.cloudflare.com/pages/functions/plugins/sentry/
Is it possible that to use this plugin to make the Sentry/Astro integration compatible with CF Pages?
Maybe releated to: #12620