这是indexloc提供的服务,不要输入任何密码
Skip to content

Add troubleshooting docs. #734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/pages/docs/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"reference": "API Reference",
"changelog": "Changelog",
"upgrading-to-v1": "Upgrading to v1",
"troubleshooting": "Troubleshooting",
"glossary": "Glossary",
"acknowledgements": "Acknowledgements",
"faq": "FAQ"
Expand Down
41 changes: 41 additions & 0 deletions docs/pages/docs/troubleshooting.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: Troubleshooting
description: This guide aims to help you debug issues with your Turborepo builds and configuration.
---

# 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](https://github.com/vercel/turborepo/blob/main/examples/basic/apps/docs/next.config.js#L1)).
- 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 metaframework, 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 properly specified](https://turborepo.org/docs/features/caching#configuring-cache-outputs) in your Turborepo [pipeline](https://turborepo.org/docs/features/pipelines#defining-a-pipeline)?
- Pipeline settings are not inherited or merged, so they need to be re-specified in [package-specific tasks](https://turborepo.org/docs/features/pipelines#implicit-dependencies-and-specific-package-tasks) (e.g. `web#build` does **not** inherit pipeline settings from `build`).
- [Are relevant inlined environment variables accounted for?](https://turborepo.org/docs/features/caching#alter-caching-based-on-environment-variables-and-files)
- To verify, run `turbo` in verbose mode by adding `-vvv` to `turbo run <task>` and look at which environment variables are included in the hashes.

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

- Are [cache outputs properly specified](https://turborepo.org/docs/features/caching#configuring-cache-outputs) in your Turborepo [pipeline](https://turborepo.org/docs/features/pipelines#defining-a-pipeline)?
- Pipeline settings are not inherited or merged, so they need to be re-specified in [package-specific tasks](https://turborepo.org/docs/features/pipelines#implicit-dependencies-and-specific-package-tasks) (e.g. `web#build` does **not** inherit pipeline settings from `build`).

## My build is caching the wrong environment variables

- [Are relevant inlined environment variables accounted for?](https://turborepo.org/docs/features/caching#alter-caching-based-on-environment-variables-and-files)
- To verify, run `turbo` in verbose mode by adding `-vvv` to `turbo run <task>` and look at which environment variables are included in the hashes.
3 changes: 1 addition & 2 deletions docs/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
const colors = require("tailwindcss/colors");

module.exports = {
mode: "jit",
purge: [
content: [
"./components/**/*.js",
"./components/**/*.tsx",
"./nextra-theme-docs/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion docs/theme.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const theme = {
className="font-medium text-white no-underline dark:text-black "
title="Go to the Vercel website"
>
Turborepo is joining Vercel. Read More →
Turborepo has joined Vercel. Read More →
</a>
</div>
);
Expand Down