[ error ] ./node_modules/@sentry/node/esm/integrations/console.js Module not found: Can't resolve 'console' in - Sentry in Nextjs
See original GitHub issuePackage + Version
@sentry/browser
^5.11.0@sentry/node
^5.11.0node
v12.7.0
Description
I have a nextjs application and I followed this tutorial provided by nextjs community. The problem is after building and running my app it gives this error:
[ error ] ./node_modules/@sentry/node/esm/integrations/console.js
Module not found: Can't resolve 'console' in '/.../node_modules/@sentry/node/esm/integrations'
I rebuild my app and removed my yarn lock and build folder but nothing happened! Although I have the directory in my node_modules!
The error is when I’m trying to import Sentry like this :
import * as Sentry from '@sentry/node';
Issue Analytics
- State:
- Created 4 years ago
- Reactions:18
- Comments:24 (1 by maintainers)
Top Results From Across the Web
Module not found: Can't resolve 'console' #24966 - GitHub
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 ...
Read more >integrating Sentry in Next.js project - Stack Overflow
js with AMP. That means my code runs only on the server. no client code. I'm trying to integrate @sentry/node However, while ...
Read more >Hardhat Can't resolve 'console' on react project
This is error message when the project is compiling ./node_modules/@sentry/node/esm/integrations/console.js Module not found: Can't resolve ...
Read more >NodeJS: Missing dependencies - SDKs - #sentry
Hi everyone, I'm trying to connect Sentry to NextJS/React app. So far I've successfully connected from client (React) via @sentry/browser, ...
Read more >@sentry/nextjs - npm
This package is a wrapper around @sentry/node for the server and @sentry/react for the client, with added functionality related to Next.js.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For anyone using the latest update with
@sentry/nextjs
after running the new setup (which simplified things quite a bit), change all of your imports fromimport * as Sentry from '@sentry/node';
toimport * as Sentry from '@sentry/nextjs';
.Add:
to the
next.config.js