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

Specifying webpack configuration in next config breaks next build #71911

Open
dualdetail opened this issue Oct 27, 2024 · 0 comments
Open

Specifying webpack configuration in next config breaks next build #71911

dualdetail opened this issue Oct 27, 2024 · 0 comments
Labels
bug Issue was opened via the bug report template. Webpack Related to Webpack with Next.js.

Comments

@dualdetail
Copy link

Link to the code that reproduces this issue

https://github.com/dualdetail/webpack-example

To Reproduce

npm install
npm run build

Screenshot 2024-10-26 212121

Current vs. Expected behavior

Currently, build prints webpack caching failure then stops building (this also prints in dev without issues). If you remove the webpack configuration from next.config.ts the build will process normally. I set it up so the next.config.ts file does not change the config but just returns the default which still fails.

Expected behavior is build will work with webpack configuration.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 98051
  Available CPU cores: 32
Binaries:
  Node: 23.0.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.0.2-canary.8 // Latest available version is detected (15.0.2-canary.8).
  eslint-config-next: 15.0.2-canary.8
  react: 19.0.0-rc-1631855f-20241023
  react-dom: 19.0.0-rc-1631855f-20241023
  typescript: 5.6.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Webpack

Which stage(s) are affected? (Select all that apply)

next build (local)

Additional context

I have tried using both npm and pnpm without success. Also I did not get webpack.cache.PackFileCacheStrategy print out in nextjs 14.2.15.

@dualdetail dualdetail added the bug Issue was opened via the bug report template. label Oct 27, 2024
@github-actions github-actions bot added the Webpack Related to Webpack with Next.js. label Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Webpack Related to Webpack with Next.js.
Projects
None yet
Development

No branches or pull requests

1 participant