-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
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?
Self-hosted/on-premise
Which SDK are you using?
@sentry/astro
SDK Version
10.9.0
Framework Version
[email protected] @astrojs/node9.4.3
Link to Sentry event
No response
Reproduction Example/SDK Setup
astro.config.mjs
// @ts-check
import { defineConfig } from "astro/config";
import node from "@astrojs/node";
import sentry from "@sentry/astro";
// https://astro.build/config
export default defineConfig({
output: "server",
adapter: node({
mode: "standalone",
}),
integrations: [
sentry({
sourceMapsUploadOptions: {
project: __YOUR_PROJECT__,
org: __YOUR_ORG__",
authToken: __YOUR_TOKEN__
},
}),
],
vite: {
build: {
rollupOptions: {
external: ["fsevents"], // Added fsevents because an error occurred when build.
},
},
},
});
sentry.client.config.js
import * as Sentry from "@sentry/astro";
Sentry.init({
dsn: __YOUE_DSN__,
integrations: [],
});
Steps to Reproduce
npm create astro@latest
npx astro add @sentry/astro
npm i @astrojs/node
- add
sentry.client.config.js
& editastro.config.mjs
npm run build
Expected Result
Build success
Actual Result
05:35:43 [ERROR] [vite] ✗ Build failed in 3.13s
node_modules/rollup/dist/es/shared/parseAst.js (11:27): "basename" is not exported by "__vite-browser-external", imported by "node_modules/rollup/dist/es/shared/parseAst.js".
file: /workspaces/test/node_modules/rollup/dist/es/shared/parseAst.js:11:27
9: */
10: import { parse, parseAsync } from '../../native.js';
11: import { resolve, dirname, basename, extname } from 'node:path';
^
12:
13: // This file is generated by scripts/generate-node-types.js.
Deleting sentry.client.config.js allows the build to succeed normally.
However, client-side errors like the one in the sample did not appear to be sent to Sentry.
src/pages/index.astro
<button onclick="throw new Error('This is a test error')">Throw test error</button>
Metadata
Metadata
Assignees
Projects
Status
Waiting for: Product Owner