NEXTJS_NO_TURBO_CACHE
Last updated March 4, 2025
Conformance is available on Enterprise plans
This rule prevents the .next/cache folder from being added to the Turborepo cache.
This is important because including the .next/cache folder in the Turborepo cache can cause
the cache to grow to an excessive size. Vercel also already includes this cache in the build
container cache.
The following turbo.json config will be caught by this rule for Next.js apps:
turbo.json
{
"extends": ["//"],
"pipeline": {
"build": {
"outputs": [".next/**"]
}
}
}To fix, add "!.next/cache/**" to the list of outputs for the task.
turbo.json
{
"extends": ["//"],
"pipeline": {
"build": {
"outputs": [".next/**", "!.next/cache/**"]
}
}
}Was this helpful?