You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When resolving a nextjs page the error is thrown in the server side console.
error - ./node_modules/@sentry/node/esm/integrations/console.js:19:0
Module not found: Can't resolve 'console'
I switched from the old with-sentry example to the new one which uses the early adaptors version of @sentry/nextjs.
A similar error could occur in the previous example, but it was resolved by specifying the alias in the next.config.js file.
if (!isServer) {
config.resolve.alias['@sentry/node'] = '@sentry/browser'
}
I also tried using both cross-env and esm which are mentioned as a potential solution in previous versions of the with-sentry example. "cross-env NODE_OPTIONS=\"-r esm\" next This unfortunately produces the same result.
Expected Behavior
The page gets compiled successfully and returned by the server to the browser.
To Reproduce
clone the with-sentry example app.
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 28, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What example does this report relate to?
with-sentry
What version of Next.js are you using?
10.2.0
What version of Node.js are you using?
16.1.0
What browser are you using?
Firefox
What operating system are you using?
Windows
How are you deploying your application?
next start
Describe the Bug
When resolving a nextjs page the error is thrown in the server side console.
I switched from the old with-sentry example to the new one which uses the early adaptors version of
@sentry/nextjs
.A similar error could occur in the previous example, but it was resolved by specifying the alias in the
next.config.js
file.I also tried using both
cross-env
andesm
which are mentioned as a potential solution in previous versions of the with-sentry example."cross-env NODE_OPTIONS=\"-r esm\" next
This unfortunately produces the same result.Expected Behavior
The page gets compiled successfully and returned by the server to the browser.
To Reproduce
clone the with-sentry example app.
The text was updated successfully, but these errors were encountered: