Skip to content
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

Next fails to build when using webpack's CompressionPlugin #22510

Closed
awareness481 opened this issue Feb 24, 2021 · 3 comments
Closed

Next fails to build when using webpack's CompressionPlugin #22510

awareness481 opened this issue Feb 24, 2021 · 3 comments
Labels
bug Issue was opened via the bug report template.

Comments

@awareness481
Copy link
Contributor

What version of Next.js are you using?

10.0.7

What version of Node.js are you using?

v14.15.1

What browser are you using?

Chrome

What operating system are you using?

Xubuntu 20.04

How are you deploying your application?

N/A

Describe the Bug

Using webpack's CompressionPlugin makes Next's build process fail with following error message

> Build error occurred
Error: Cannot find module 'webpack'

Full error log

This was working in Next v10.0.5. Note, I haven't found which is latest working version of Next.

Expected Behavior

To build and create the compressed files.

To Reproduce

  1. Clone https://github.com/awareness481/Next-With-CompressionPlugin-bug
  2. Install deps
  3. Run npm run build
  4. Observe failed build

I'm not sure if Next.js is expected to work with webpack's CompressionPlugin or webpack's core plugins, but it was working in earlier versions which is why I decided to file this issue.

@awareness481 awareness481 added the bug Issue was opened via the bug report template. label Feb 24, 2021
@timneutkens
Copy link
Member

Duplicate of #21679

@timneutkens timneutkens marked this as a duplicate of #21679 Feb 25, 2021
@awareness481
Copy link
Contributor Author

Sorry about the duplicate! I sincerely forgot to search if the issue already exists before creating one.

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

3 participants