question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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";

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
lobsterkatiecommented, Mar 11, 2022

And use with Explorer file nesting,

TIL! Thanks for sharing your setup, @ka2n!

1reaction
mavlikwowacommented, Sep 20, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attempted import error:' is not exported from - Stack Overflow
I had the same error, but used export default and it worked! declare class lama { // code here .. export default lama...
Read more >
@sentry/nextjs - npm
Start using @sentry/nextjs in your project by running `npm i ... sentry.client.config.js import * as Sentry from '@sentry/nextjs'; ...
Read more >
Build fails after adding Sentry to a Next.js app with target
After adding Sentry to a Next.js app with target: 'serverless' using npx @sentry/wizard -i nextjs , I get the following error:
Read more >
@sentry/utils | Yarn - Package Manager
Changelog. Unreleased. "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott. 7.27.0. This release exports the...
Read more >
Blog - Next.js 11.1
The reported issue did not directly harm users, ... Starting with Next.js 11.1, you can now import npm packages using ES Modules (e.g. ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found