Skip to content

Module '"@sentry/nextjs"' has no exported member 'BrowserTracing'. #4569

Description

@seanparmelee

Hello 👋
I just updated to Sentry 6.17.7 and saw that BrowserTracing has since been directly exported through @sentry/nextjs so I went to update my sentry.client.config.ts file:

-import { Integrations } from '@sentry/tracing';+import { BrowserTracing } from '@sentry/nextjs';
-integrations: [new Integrations.BrowserTracing(), new OfflineIntegration()],+integrations: [new BrowserTracing(), new OfflineIntegration()],

But TypeScript is complaining about the import, saying

Module '"@sentry/nextjs"' has no exported member 'BrowserTracing'. ts(2305)

It seems TypeScript is looking in the server index file, rather than the client. I'm not sure there's a good way around this at the moment, aside from ignoring this error or also exporting BrowserTracing from the server file. I did come across microsoft/TypeScript#29128 which seems like what we'd need here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions