Closed ani4aniket closed 3 years ago
Seeing a similar error with this next.config.js (generated by the sentry wizard):
const { withSentryConfig } = require("@sentry/nextjs");
const SentryWebpackPluginOptions = {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
// release, url, org, project, authToken, configFile, stripPrefix,
// urlPrefix, include, ignore
silent: true, // Suppresses all logs
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
};
const config = {
reactStrictMode: true,
};
module.exports = withSentryConfig(config, SentryWebpackPluginOptions);
And the Netlify build error:
11:17:44 AM: ModuleNotFoundError: Module not found: Error: Can't resolve 'webpack' in '/opt/build/repo/node_modules/@next/react-refresh-utils'
Is it possible to just use @sentry/react
for Netlify builds? Given that these are static builds anyway I'm not sure there's much/any value added by using the custom @sentry/next
package.
Thanks!
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog
or Status: In Progress
, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
I have the same issue Cannot find module 'webpack'
with this next.config.js
on Netlify, even if a don't set a target the same error occurs. I didn't had this issue before setting sentry on the project.
const moduleExports = { target: 'experimental-serverless-trace' }
const sentryWebpackPluginOptions = {
silent: true,
}
module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions)
Currently using "@sentry/nextjs": "^6.14.1"
Package + Version
@sentry/browser
@sentry/node
raven-js
raven-node
(raven for node)Version:
Description
Describe your issue in detail, ideally, you have a reproducible demo that you can show. When the target in
next.config.js
fromserverless
toexperimental-serverless-trace
, in the resolution of https://github.com/getsentry/sentry-javascript/issues/3575, Netlify build is failing, throws an error:Cannot find module '@prisma/client'
Netlify Logs: https://pastebin.com/6bExettA
next.config.js