Open dualdetail opened 6 days ago
So I experimented on accident. It seems related to node v23. I was able to build the app using node v22 just fine. I tested this on a separate machine and updating to node v23 and installing libraries produces the same output (as in it doesn't build)
Similar problem here, build is breaking with below error after bumping Node to 23.1.0.
Error: Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id
Having this issue as well building a Next 13.5.6 app on Node v23.
Creating an optimized production build .<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies
Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks!
Link to the code that reproduces this issue
https://github.com/dualdetail/webpack-example
To Reproduce
npm install npm run build
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
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. I did not get webpack.cache.PackFileCacheStrategy print out in nextjs 14.2.15 and node v23.