Troubleshooting
This guide aims to help you debug issues with your Turborepo builds and configuration.
My dependency isn't being built correctly
- Are you properly bundling and transpiling the dependency before building the application?
- For example, libraries like
tsc,tsup,esbuild,babel, andswcwill convert newer JavaScript features back to “pure” JavaScript. - If you are using Next.js, you might be using
next-transpile-modules. Ensure you add the name of the dependency insidenext.config.js(example).
- For example, libraries like
- Have you listed
filesin the dependency'spackage.jsonto point to the correct files?
My types are not being found
- Did you specify
typesortypinginside the dependency'spackage.jsonto point to the.d.tsfile? - Have you altered or set custom
tsconfig.jsonpaths?- Do they have the correct folder structure for your application?
- Are they properly configured for the meta framework, bundler, or transpilation tool?
I'm not seeing any cache hits
- Is any source code being generated during the build that isn't checked into git?
- This would change the fingerprint Turborepo uses to store build outputs.
- Are cache outputs correctly specified in your Turborepo pipeline?
- Pipeline settings are not inherited or merged, so they need to be re-specified in workspace-specific tasks (e.g.
web#builddoes not inherit pipeline settings frombuild).
- Pipeline settings are not inherited or merged, so they need to be re-specified in workspace-specific tasks (e.g.
- Are relevant inlined environment variables accounted for?
- To verify, run
turboin verbose mode by adding-vvvtoturbo run <task>and look at which environment variables are included in the hashes.
- To verify, run
I'm seeing cache hits, but my build is broken
- Are cache outputs properly specified in your Turborepo pipeline?
- Pipeline settings are not inherited or merged, so they need to be re-specified in workspace-specific tasks (e.g.
web#builddoes not inherit pipeline settings frombuild).
- Pipeline settings are not inherited or merged, so they need to be re-specified in workspace-specific tasks (e.g.
My build is caching the wrong environment variables
- Are relevant inlined environment variables accounted for?
- To verify, run
turboin verbose mode by adding-vvvtoturbo run <task>and look at which environment variables are included in the hashes.
- To verify, run
Last updated on June 5, 2025