Hi There,
I'm working with Electron and Next.js, but from couple of days ago I see an error on the console.

module.exports = {
webpack(params) {
const config = { ...params };
config.target = 'electron-renderer';
config.module.exprContextCritical = false;
config.devtool = false;
config.plugins = config.plugins.filter(plugin => {
return plugin.constructor.name !== 'UglifyJsPlugin';
});
if (config.resolve.alias) {
delete config.resolve.alias.react;
delete config.resolve.alias['react-dom'];
}
return config;
}
};
Closing this, After investigating in react code found that the reason is the old version of the react-devtool.
for me error was happening due to old extension in the chrome browser named React Developer tools by disabling it i was able to solve this error you could try the same or try installing latest react developer tool.
I have the same issue. There was no obvious reason why it started happening, because code has not have any updates. I tried to open a page in another browser and it worked as I expected. So I don't understand how it can happen this way, but I have it only in my Chrome v86.0.4240.198
Most helpful comment
Closing this, After investigating in react code found that the reason is the old version of the
react-devtool.https://github.com/facebook/react/blob/c59c3dfe554dafb64864f3bbcfff6ffe51f32275/packages/react-refresh/src/ReactFreshRuntime.js#L485