-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Automatic sveltekit load instrumentation causes vite bundle errors with duplicate identifier "load" #8854
Comments
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 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! |
@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. |
…mentation (#8881) In our auto instrumentation Vite plugin for SvelteKit, we read `+(page|layout)(.server).(js|ts)` files' code to determine if we should add our wrapper to the file or not. We previously didn't check for a file id's existence before reading the file if the id matched that certain pattern, wrongly assuming that these ids would always map to actually existing files. It seems like Vite plugins such as Houdini's plugin add file ids to the build for files that actually don't exist (#8846, #8854) . When our plugin's `load` hook was called for such an id, it then tried to access and read the file which caused a build error. This patch now adds a file existence guard to ensure we simply no-op for these files.
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
7.64.0
Framework Version
1.22.6
Link to Sentry event
No response
SDK Setup
Steps to Reproduce
I added the Sentry SDK to a Sveltekit project using the wizard.
My vite config is:
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:
The text was updated successfully, but these errors were encountered: