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/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/astro
SDK Version
7.85.0
Framework Version
4.0.3
Link to Sentry event
No response
SDK Setup
import cloudflare from "@astrojs/cloudflare"
import svelte from "@astrojs/svelte"
import tailwind from "@astrojs/tailwind"
import { defineConfig } from "astro/config"
import mkcert from "vite-plugin-mkcert"
import icons from "unplugin-icons/vite"
import sentry from "@sentry/astro"
import mdx from "@astrojs/mdx"
import spotlightjs from "@spotlightjs/astro"
import { loadEnv } from "vite"
import { version, name } from "./package.json" assert { type: "json" }
const { SENTRY_AUTH_TOKEN } = loadEnv(process.env.NODE_ENV, process.cwd(), "")
// https://astro.build/config
export default defineConfig({
site: "XXXXXXX",
integrations: [
svelte(),
tailwind(),
mdx({
optimize: true,
}),
sentry({
dsn: "XXXXXXX",
environment: process.env.NODE_ENV,
release: `${name}@${version}`,
sourceMapsUploadOptions: {
project: "website",
authToken: SENTRY_AUTH_TOKEN,
},
}),
spotlightjs(),
],
markdown: {
syntaxHighlight: "prism",
},
i18n: {
defaultLocale: "de",
locales: ["de", "es"],
},
experimental: {
contentCollectionCache: true,
},
output: "server",
adapter: cloudflare(),
vite: {
server: {
https: true,
},
plugins: [
mkcert(),
icons({
scale: 1.2,
compiler: "svelte",
autoInstall: true,
}),
icons({
scale: 1.2,
compiler: "astro",
autoInstall: true,
}),
],
},
})
Steps to Reproduce
- Create new Astro Sentry setup with pnpm create
- Setup sentry
- Do a build
Expected Result
No build errors.
Actual Result
✘ [ERROR] Could not resolve "util"
node_modules/.pnpm/@[email protected]/node_modules/@sentry/node/esm/integrations/context.js:6:26:
6 │ import { promisify } from 'util';
╵ ~~~~~~
The package "util" wasn't found on the file system but is built into node. Are you trying to
bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
Could not resolve "child_process"
Metadata
Metadata
Assignees
Type
Projects
Status
No status
Status
No status