Building with Turbopack (`next build --turbopack`) cases this error. ### Link to the code that reproduces this issue https://github.com/rinarakaki/my-minimal-nextjs-issue-reproduction ### To Reproduce 1. `docker build -f apps/frontend/Dockerfile -t frontend .` 2. `docker run --rm -p 3000:3000 frontend` 3. Access http://localhost:3000/ ### Current vs. Expected behavior ``` Failed to prepare server [Error: An error occurred while loading the instrumentation hook] { [cause]: ReferenceError: require is not defined at <unknown> (.next/server/instrumentation.js:2:17) } ✓ Ready in 191ms Failed to prepare server [Error: An error occurred while loading the instrumentation hook] { [cause]: [Error: Unexpected module status 5. Cannot require() ES Module /app/apps/frontend/.next/server/instrumentation.js because it is not yet fully loaded. This may be caused by a race condition if the module is simultaneously dynamically import()-ed via Promise.all(). Try await-ing the import() sequentially in a loop instead. (from /app/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/server/next-server.js) This is caused by either a bug in Node.js or incorrect usage of Node.js internals. Please open an issue with this stack trace at https://github.com/nodejs/node/issues ] { code: 'ERR_INTERNAL_ASSERTION' } } ``` ### Provide environment information ```bash Operating System: Platform: linux Arch: arm64 Version: #1 SMP Thu Mar 20 16:32:56 UTC 2025 Available memory (MB): 11950 Available CPU cores: 8 Binaries: Node: 22.14.0 npm: 11.3.0 Yarn: N/A pnpm: 10.10.0 Relevant Packages: next: 15.3.1 // Latest available version is detected (15.3.1). eslint-config-next: N/A react: 19.1.0 react-dom: 19.1.0 typescript: N/A Next.js Config: output: N/A ``` ### Which area(s) are affected? (Select all that apply) Not sure ### Which stage(s) are affected? (Select all that apply) Other (Deployed) ### Additional context _No response_
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by rinarakaki and has received 0 comments.