Skip to content
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

Fix error message documentation #4094

Merged
merged 1 commit into from
Mar 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 9 additions & 8 deletions docs/pages/repo/docs/getting-started/create-new.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ You can also clone a Turborepo starter repository to get a head start on your mo

## Full tutorial

This tutorial will walk you through using the Turborepo [`basic` example](https://github.com/vercel/turbo/tree/main/examples/basic). By the end, you'll feel confident with using `turbo`, and know all the basic functionality.
This tutorial will walk you through setting up a basic example. By the end, you'll feel confident with using `turbo`, and know all the basic functionality.

<Callout type="info">

Expand Down Expand Up @@ -323,36 +323,37 @@ Let's take a look inside `turbo.json`, at the root:
{
"pipeline": {
"build": {
// ^^^^^
"dependsOn": ["^build"],
"outputs": ["dist/**", ".next/**"]
},
"lint": {},
"dev": {
// ^^^
"cache": false
}
}
}
```

What we're seeing here is that we've _registered_ three tasks with `turbo` - `lint`, `dev` and `build`. Every task that's registered inside `turbo.json` can be run with `turbo run <task>` (or `turbo <task>` for short).
What we're seeing here is that we've _registered_ three tasks with `turbo`: `lint`, `dev` and `build`.
Every task registered inside `turbo.json` can be run with `turbo run <task>` (or `turbo <task>` for short).

To see this in action, let's try running a script called `hello` - which doesn't yet exist in our `turbo.json`:
<Callout type="error">
Before we move on, let's try running a task called `hello` that _isn't_ registered in `turbo.json`:

```bash
turbo hello
```

You'll see this error in the console:
You'll see an error in the terminal. Something resembling:

```
task `hello` not found in turbo `pipeline` in "turbo.json".
Are you sure you added it?
Could not find the following tasks in project: hello
```

That's worth remembering - **in order for `turbo` to run a task, it must be in `turbo.json`**.

</Callout>

Let's investigate the scripts we already have in place.

### 4. Linting with Turborepo
Expand Down