-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin is not working with next 10.0.6 and webpack 5 #270
Comments
I haven't looked at whats new in Workbox 6, but would love to upgrade! |
@hanford @adam187 $ next dev
Loaded env from /Users/luisalaguna/Projects/portfolio/frontend/.env.development
Error: Cannot find module 'webpack'
Require stack:
- /Users/luisalaguna/Projects/portfolio/frontend/node_modules/workbox-webpack-plugin/build/lib/get-manifest-entries-from-compilation.js
- /Users/luisalaguna/Projects/portfolio/frontend/node_modules/workbox-webpack-plugin/build/generate-sw.js
- /Users/luisalaguna/Projects/portfolio/frontend/node_modules/workbox-webpack-plugin/build/index.js
- /Users/luisalaguna/Projects/portfolio/frontend/node_modules/next-offline/index.js
- /Users/luisalaguna/Projects/portfolio/frontend/next.config.js
- /Users/luisalaguna/Projects/portfolio/frontend/node_modules/next/dist/next-server/server/config.js
- /Users/luisalaguna/Projects/portfolio/frontend/node_modules/next/dist/next-server/server/next-server.js
- /Users/luisalaguna/Projects/portfolio/frontend/node_modules/next/dist/server/next.js
- /Users/luisalaguna/Projects/portfolio/frontend/node_modules/next/dist/server/lib/start-server.js
- /Users/luisalaguna/Projects/portfolio/frontend/node_modules/next/dist/cli/next-dev.js
- /Users/luisalaguna/Projects/portfolio/frontend/node_modules/next/dist/bin/next
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15)
at Function.Module._load (node:internal/modules/cjs/loader:769:27)
at Module.require (node:internal/modules/cjs/loader:997:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (/Users/luisalaguna/Projects/portfolio/frontend/node_modules/workbox-webpack-plugin/build/lib/get-manifest-entries-from-compilation.js:12:5)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Module.require (node:internal/modules/cjs/loader:997:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (/Users/luisalaguna/Projects/portfolio/frontend/node_modules/workbox-webpack-plugin/build/generate-sw.js:24:43)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/luisalaguna/Projects/portfolio/frontend/node_modules/workbox-webpack-plugin/build/lib/get-manifest-entries-from-compilation.js',
'/Users/luisalaguna/Projects/portfolio/frontend/node_modules/workbox-webpack-plugin/build/generate-sw.js',
'/Users/luisalaguna/Projects/portfolio/frontend/node_modules/workbox-webpack-plugin/build/index.js',
'/Users/luisalaguna/Projects/portfolio/frontend/node_modules/next-offline/index.js',
'/Users/luisalaguna/Projects/portfolio/frontend/next.config.js',
'/Users/luisalaguna/Projects/portfolio/frontend/node_modules/next/dist/next-server/server/config.js',
'/Users/luisalaguna/Projects/portfolio/frontend/node_modules/next/dist/next-server/server/next-server.js',
'/Users/luisalaguna/Projects/portfolio/frontend/node_modules/next/dist/server/next.js',
'/Users/luisalaguna/Projects/portfolio/frontend/node_modules/next/dist/server/lib/start-server.js',
'/Users/luisalaguna/Projects/portfolio/frontend/node_modules/next/dist/cli/next-dev.js',
'/Users/luisalaguna/Projects/portfolio/frontend/node_modules/next/dist/bin/next'
]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
10.0.4 seeing this as well
|
Hmmm, it's working on my personal website which is on next 10.0.5, but it seems to stop working on newer versions... |
Looks like it's no longer an issue with 10.0.8 |
I am hitting this issue with 10.0.8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey,
I faced an issue after upgrading to [email protected]
Looks like it's a problem with https://www.npmjs.com/package/workbox-webpack-plugin so probably upgrade to version 6 could solve it, I'm not sure if that already changed it but probably yes.
{ Error: Cannot find module 'webpack' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (/Users/adam/Projects/mf/next-offline-example/node_modules/workbox-webpack-plugin/build/lib/get-manifest-entries-from-compilation.js:12:5) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (/Users/adam/Projects/mf/next-offline-example/node_modules/workbox-webpack-plugin/build/generate-sw.js:24:43) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) code: 'MODULE_NOT_FOUND' }
Here is a related issue on the next.js side
vercel/next.js#21679
Here is reproduction:
https://github.com/adam187/next-offline-example
I can help with migrating if needed but would rather have some inside from the author first :)
The text was updated successfully, but these errors were encountered: