dlehmhus / next-with-linaria

Linaria webpack loader for Next.js
MIT License
104 stars 6 forks source link

Cannot find module webpack when updating Next to v13.4.9 #18

Closed luizeboli closed 1 year ago

luizeboli commented 1 year ago

After updating Next to v13.4.9 I'm getting a "Cannot find module 'webpack'" error in dev mode

Error: Cannot find module 'webpack'
Require stack:
- <projectPath>/node_modules/next-with-linaria/lib/plugins/errorPlugin.js
- <projectPath>/node_modules/next-with-linaria/lib/webpackConfig.js
- <projectPath>/next.config.js

I tried to investigate if webpack was a peer dependency of both packages but its not, it's a dev dependency for both packages.

Next v13.4.8 works fine.

luizeboli commented 1 year ago

Might be related to https://github.com/vercel/next.js/issues/52366

luizeboli commented 1 year ago

Solved in the Next v13.4.10-canary.5