• Repo
  • 文档
  • Troubleshooting

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, and swc will 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 inside next.config.js (example).
  • Have you listed files in the dependency's package.json to point to the correct files?

My types are not being found

  • Did you specify types or typing inside the dependency's package.json to point to the .d.ts file?
  • Have you altered or set custom tsconfig.json paths?
    • 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

I'm seeing cache hits, but my build is broken

My build is caching the wrong environment variables