turbopack is the new default bundler since next.js v16: https://nextjs.org/docs/app/api-reference/turbopack#version-changes
Turbopack becomes the default bundler for Next.js. Automatic support for Babel when a configuration file is found.
In the default configuration, it is responsible for deployment errors: Turbopack ignores package.json files when there are directly in the $HOME directory. However it is the case in our build image/process
Thus, it raises the following warning, and fails to build the project
⚠ Warning: Next.js ignored package.json in /build/<uuid> because it would include your home directory (/build/<uuid>).
...
Error: Could not find the Next.js package (next/package.json)
Resolved from: /build/<uuid>/packages/applications/ssr/src/app
Filesystem root used for resolution: /build/<uuid>/packages/applications/ssr
The workaround identified at the moment is to override the HOME env var before executing the build, which is pretty unusual.
"build": "HOME=\"${TMPDIR:-/tmp}/next-build-home\" next build",
Maybe better workaround may be found and properly documented?
Maybe even we could try to support it directly within the buildpack?
turbopack is the new default bundler since next.js v16: https://nextjs.org/docs/app/api-reference/turbopack#version-changes
In the default configuration, it is responsible for deployment errors: Turbopack ignores
package.jsonfiles when there are directly in the$HOMEdirectory. However it is the case in our build image/processThus, it raises the following warning, and fails to build the project
The workaround identified at the moment is to override the
HOMEenv var before executing the build, which is pretty unusual.Maybe better workaround may be found and properly documented?
Maybe even we could try to support it directly within the buildpack?