Reproducing the error (with next@7.0,2)
npm install
npm run dev
Error dissapears with next@6.1.1
npm install next@6.1.1
npm run dev
- Everying works as expected
Please visit webpack/webpack#6642 for more information in the mean time
in your next.config.js
const withWorkers = require("@zeit/next-workers");
module.exports = withWorkers({
webpack(config, options) {
// add this to make the web workers work in next js version 7
config.output.globalObject = `(typeof self !== 'undefined' ? self : this)`;
return config;
}
});
and the error goes away :)