sentry-javascript: Attempted import error: 'withSentry' is not exported from '@sentry/nextjs'.

Package + Version

Description

Describe your issue in detail, ideally, you have a reproducible demo that you can show.

Attempted import error: 'withSentry' is not exported from '@sentry/nextjs'.

Though exported in handlers.ts enabled import into api/index handler.

Same with import * as Sentry from "@sentry/nextjs";

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 4
  • Comments: 17 (7 by maintainers)

Most upvoted comments

And use with Explorer file nesting,

TIL! Thanks for sharing your setup, @ka2n!

GA, @onurtemizkan I have created an example repo where you can reproduce this issue. https://github.com/mavlikwowa/sentry_nexjs_issue When I had been creating this I payed an attention that error appointed when I used API call in getInitialProps function:

App.getInitialProps = async () => {
  await apiCall();
};

Perhaps, it can help us to resolve this probem. P.S I can’t publish all working repo due to NDA, sorry. There’s only for error’s reproducing.