---
title: "SW01002: Invalid hash length"
description: "The hashLength setting is outside the supported range."
image: "https://stillwind.dev/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://stillwind.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# SW01002: Invalid hash length

This error occurs when `hashLength` is not an integer from 1 to 50. The setting
chooses the number of hash characters in generated names. The message shows the
value and the maximum.

## Reported

**stillwind.config.ts**

```ts
import { defineConfig } from "stillwind/config";

export default defineConfig({
  projects: [
    {
      css: "./src/stillwind.css",
      files: ["src/**/*.tsx"],
      hashLength: 0,
    },
  ],
});
```

> SW01002: hashLength must be between 1 and 50 base-36 digits, not 0

## Fixed

```ts title="stillwind.config.ts"
import { defineConfig } from "stillwind/config";

export default defineConfig({
  projects: [
    {
      css: "./src/stillwind.css",
      files: ["src/**/*.tsx"],
      hashLength: 5,
    },
  ],
});
```

## How to fix

- Use an integer from 1 to 50. The default is 5.
- To shorten names, lower the value. To make collisions less likely, raise it.
- Use the same value in client and server builds that share styles.

Source: https://stillwind.dev/docs/errors/SW01002/index.mdx
