[Sentry/Next.js] Not working with Webpack 5 on Next.js 11
See original GitHub issueWhen trying to start my app with next 11, where webpack 5 is enabled by default I get the following error:
[Sentry] Could not initialize SDK. Received error:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
Packages: “@sentry/nextjs”: “^6.7.1”, “next”: “^11.0.0”,
Issue Analytics
- State:
- Created 2 years ago
- Reactions:15
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Can not run server after add sentry to nextjs project
My nextjs config is empty and i do not think this is the problem of next. If i remove the sentry config, i...
Read more >Manual Setup for Next.js - Sentry Documentation
This file sets a custom webpack configuration to use your Next.js app // with Sentry. // https://nextjs.org/docs/api-reference/next.config.js/introduction ...
Read more >module-not-found - Next.js
The module you're trying to import is not installed in your dependencies; The module you're trying to import ... For example when importing...
Read more >Next.js + Webpack - Fix for ModuleNotFoundError: Module not ...
To fix the error with Webpack 5, update your Next.js config file ( /next.config.js ) with the following, it tells webpack not to...
Read more >How to Build, Deploy, & Monitor Next.js Applications with ...
Watch Neil Manvar ( Sentry ) and Ramin Sedighi (Netlify) walk you through how to build and deploy Next. js applications with Netlify...
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 Free
Top 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
I mistakenly posted on #3700 about a closely related issue. I’m receiving this error after updating to Next 11:
@joneath’s solution would not work in my case, as even after deleting the cache and hard-upgrading everything,
.next/server/sentry/initServerSDK.js
is NOT generated. In fact, no sentry file is generated anywhere I can find.@mikestopcontinues I should have deleted that. I realized in https://github.com/getsentry/sentry-javascript/issues/3722 that I was not following the directions!