Repository navigation
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?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/sveltekit
SDK Version
7.64.0
Framework Version
1.22.6
Link to Sentry event
No response
SDK Setup
Sentry.init({
dsn: "https://7f6570917828021f8dea53dc2b778775@o1098001.ingest.sentry.io/4505744165699584",
tracesSampleRate: 1
})Steps to Reproduce
I added the Sentry SDK to a Sveltekit project using the wizard.
My vite config is:
export default defineConfig({
plugins: [
sentrySvelteKit({
sourceMapsUploadOptions: {
org: "million-marker",
project: "future",
},
debug: true,
}),
houdini(),
sveltekit(),
Icons({ compiler: "svelte" }),
svg({
svgoOptions: {
plugins: [
{
name: "preset-default",
params: { overrides: { removeViewBox: false } },
},
{
name: "prefixIds",
},
],
},
}),
],
ssr: {
// Prevent crashes in SSR when Felte forms are used. See
// https://github.com/pablo-abc/felte/issues/201#issuecomment-1381641343
noExternal: ["felte"],
},
});Expected Result
No crash when running in development
Actual Result
Upon starting a dev server, I immediately receive errors due to the automatic load instrumentation. With the plugin debug option enabled:
Wrapping /Users/francis/millionmarker/future/src/routes/+layout.ts with Sentry load wrapper
Wrapping /Users/francis/millionmarker/future/src/routes/(app)/+page.ts with Sentry load wrapper
Internal server error: ENOENT: no such file or directory, open '/src/routes/(app)/+layout.js'
(x2)
Internal server error: Transform failed with 2 errors:
/Users/francis/millionmarker/future/src/routes/+layout.ts:13:13: ERROR: Multiple exports with the same name "load"
/Users/francis/millionmarker/future/src/routes/+layout.ts:13:13: ERROR: The symbol "load" has already been declared
Plugin: vite:esbuild
File: /Users/francis/millionmarker/future/src/routes/+layout.ts:13:13
Multiple exports with the same name "load"
11 | }
12 |
13 | export const load = userModule.load ? wrapLoadWithSentry(userModule.load) : undefined;
| ^
14 | export * from "/Users/francis/millionmarker/future/src/routes/+layout.ts?sentry-auto-wrap";
The symbol "load" has already been declared
11 | }
12 |
13 | export const load = userModule.load ? wrapLoadWithSentry(userModule.load) : undefined;
| ^
14 | export * from "/Users/francis/millionmarker/future/src/routes/+layout.ts?sentry-auto-wrap";
Metadata
Metadata
Assignees
Labels
No labels
Projects
- StatusShow more project fieldsNo status
Activity
Lms24 commentedon Aug 21, 2023
Hi @fnimick thanks for reporting this! Hmm looking at your config, it seems like you have quite a few plugins running that might interfere with our auto instrumentation in some way. I have a hunch that it might be
houdini, given that a very similar issue was reported a couple of days ago (#8846). Can you try removing houdini and check if this solves the issue?As I wrote in #8646, we'll look into Sentry+Houdini next week.
If it turns out not to be related to Houdini, please try to narrow it down to a specific plugin combination and if possible, provide a minimal reproduction example that we can use to reproduce this. Thanks!
fnimick commentedon Aug 21, 2023
@Lms24 ah, you were right, it is a Houdini compatibility issue. I didn't expect it since houdini was not in use at all on the route that was causing the error.
Lms24 commentedon Aug 28, 2023
@fnimick I opened #8881 which should fix this issue. It'll go in the next patch or minor release after today's release.
fix(sveltekit): Ensure target file exists before applying auto instru…
ahsanswr commentedon Feb 21, 2025
@Lms24 I am getting the same error using
Lms24 commentedon Feb 21, 2025
This will be fixed with9.2.0releasing on Monday :)sorry, I mixed up issues, let me take another look
update: @ahsanswr can you provide a minimal reproduction? Do you get exactly the same error as reported? We previously considered this fixed. If it's not the same error, please open a new issue and fill out all details. Thanks!
ahsanswr commentedon Feb 21, 2025
Yes it seems to be exactly the same error:
I will create a reproduction but in short, it occurred after running the following commands in a sveltekit 2 project.
npx houdini@latest initnpx @sentry/wizard@latest -i sveltekit --saas --org orgname --project projname