---
title: Troubleshooting
description: Having unexpected issues? Checkout this section
icon: MdTroubleshoot
---

import { Tabs, Tab } from 'fumadocs-ui/components/tabs';

## The Scaffolder fails when using yarn

Depending on the context and under specific conditions, the [Scaffolder](/docs/cli-usage/scaffolder) may fail to install the dependencies when using `yarn`. <br />
In this case you can simply install them yourself. The Scaffolder should spit out the correct command prompt for you to do so at the end of the process. If that doesn't happen, refer to the [manual setup instructions](/docs/setup/manual-setup).

Alternatively, consider switching package manager to [pnpm](https://pnpm.io/).

## I'm using Nextjs and the Sheriff rules doesn't seem to apply

In a Nextjs project, you shouldn't follow any of Nextjs' ESLint instructions, including the usage of the command `next lint`. Just use the basic ESlint command `eslint`.

Refer to the [Nextjs compatibility documentation](/docs/faq#is-sheriff-compatible-with-x).

## I'm getting the error: Parsing error: No tsconfigRootDir was set, and multiple candidate TSConfigRootDirs are present

If you are getting the error:

```
Parsing error: No tsconfigRootDir was set, and multiple candidate TSConfigRootDirs are present:

...

You'll need to explicitly set tsconfigRootDir in your parser options.

See: https://typescript-eslint.io/packages/parser/#tsconfigrootdireslint
```

It means that the `typescript-eslint` parser is unsure about the location of the `tsconfig.json` file.

Just add this to your ESLint config:

<Tabs groupId="tsorjs" items={['JS', 'TS']} persist>
  <Tab value="JS">
```js title="eslint.config.mjs"
import { sheriff } from "eslint-config-sheriff";
import { defineConfig } from "eslint/config";

const sheriffOptions = {
  tsconfigRootDir: import.meta.dirname // [!code highlight]
};

export default defineConfig(sheriff(sheriffOptions));
```
  </Tab>
  <Tab value="TS">
```ts twoslash title="eslint.config.ts"
import { sheriff, type SheriffSettings } from "eslint-config-sheriff";
import { defineConfig } from "eslint/config";

const sheriffOptions: SheriffSettings = {
  tsconfigRootDir: import.meta.dirname // [!code highlight]
};

export default defineConfig(sheriff(sheriffOptions));
```
  </Tab>
</Tabs>

## My editor feels slow

Consult the [performance tips](/docs/performance-tips) page.
