Use of worker-plugin does not work with Next.js 10.0.6+
Manc opened this issue · 0 comments
Manc commented
Whilst building with Next.js up to version 10.0.5 works, using 10.0.6 and 10.0.7 fails like this:
Error: Cannot find module 'webpack/lib/ParserHelpers'
Require stack:
- /[…]/node_modules/worker-plugin/dist/worker-plugin.js
- /[…]/next.config.js
- /[…]/node_modules/next/dist/next-server/server/config.js
- /[…]/node_modules/next/dist/next-server/server/next-server.js
- /[…]/node_modules/next/dist/server/next.js
- /[…]/node_modules/next/dist/server/lib/start-server.js
- /[…]/node_modules/next/dist/cli/next-dev.js
- /[…]/node_modules/next/dist/bin/next
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/[…]/node_modules/worker-plugin/dist/worker-plugin.js:27:34)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/[…]/next.config.js:1:22)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/[…]/node_modules/worker-plugin/dist/worker-plugin.js',
'/[…]/next.config.js',
'/[…]/node_modules/next/dist/next-server/server/config.js',
'/[…]/node_modules/next/dist/next-server/server/next-server.js',
'/[…]/node_modules/next/dist/server/next.js',
'/[…]/node_modules/next/dist/server/lib/start-server.js',
'/[…]/node_modules/next/dist/cli/next-dev.js',
'/[…]/node_modules/next/dist/bin/next'
]
}
I have tried with and without the option future: { webpack5: true }
in next.config.js
.
See Git branch next-latest
(diff).
Related issues of the Next.js repository: