Closed williamoverton closed 5 months ago
Possibly related:
when using sveltekit which uses vite as the bundler, I get this error when trying to import supabase-js:
Error when evaluating SSR module /src/hooks.server.ts: failed to import "@supabase/supabase-js"
|- SyntaxError: [vite] Named export 'SupabaseClient' not found. The requested module '@supabase/supabase-js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@supabase/supabase-js';
const {SupabaseClient} = pkg;
I followed that it said to do for my setup
Hey, I see you're using 2.39.2, which is one of few patch releases that broke the integration 😅 I even had a note about this, but it got removed as the integration works with latest of 2.39+ - https://github.com/supabase-community/sentry-integration-js/commit/010a0a915b6755d36410d4a54a96435055b06d65
Update the package and you should be good to go :)
@kamilogorek I tried upgrading to the latest version of supabase-js but I still get the same error.
I just tried example SvelteKit app with Sentry + our integration and it worked without any issues. Unless you're able to provide some reproduction, it'll be difficult for me to fix it.
I'm having a similar problem, unfortunately without a reproduction example, but noting anyway.
Dependencies of note:
@supabase/supabase-js@2.39.3
@supabase/sentry-js-integration@0.2.0
@sentry/nextjs@7.111.0
@sentry/profiling-node@7.111.0
next@14.2.3
sentry.server.config.ts
initialization:
Sentry.init({
dsn: process.env.SENTRY_DSN,
tracesSampleRate: restrictSentry ? 0.5 : 1,
profilesSampleRate: restrictSentry ? 0.5 : 1,
integrations: [
nodeProfilingIntegration(),
new Sentry.Integrations.RequestData({
include: {
data: restrictSentry ? false : true,
},
}),
new SupabaseIntegration(SupabaseClient, {
tracing: true,
breadcrumbs: true,
errors: true,
}),
],
release: process.env.SENTRY_RELEASE,
beforeSendTransaction: beforeSendTransaction,
sendDefaultPii: false,
});
@supabase/supabase-js@2.39.3
The same usecase as in the comment above: https://github.com/supabase-community/sentry-integration-js/issues/7#issuecomment-2048200150
Update the SDK and you'll be fine :)
@kamilogorek Doh! Sorry for adding noise to your day, thanks for helping me see that :)
Bug report
Describe the bug
When fellowing the setup information from the readme like so:
I get the following error:
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Use sveltekit and the @supabase/ssr package. and then add Sentry and this integration.
Expected behavior
Amazing supabase observability
Screenshots
N/A
System information