---
title: "SW32002: Invalid initial CSS batch"
description: "The first answer to the stylesheet loader does not contain exactly one stylesheet."
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.

# SW32002: Invalid initial CSS batch

This error occurs when the first answer that an integration gives the stylesheet
loader does not contain exactly one stylesheet. The first answer is the root
stylesheet. The loader then asks for the imports that the root contains.

## Reported

```ts
import { NativeDesignSystemLoader } from "@stillwind/native";

const loader = new NativeDesignSystemLoader();
loader.provideMany([
  { id: 0, name: "root.css", content: '@import "./tokens.css";' },
  { id: 1, name: "tokens.css", content: "@theme { --color-brand: red; }" },
]);
```

> SW32002: initial provide must contain exactly one file (conventionally ID 0), got 2

## Fixed

```ts
import { NativeDesignSystemLoader } from "@stillwind/native";

const loader = new NativeDesignSystemLoader();
const step = loader.provide(0, "root.css", '@import "./tokens.css";');
if (step.kind === "needFile") {
  for (const request of step.requests) {
    loader.provide(request.id, "tokens.css", "@theme { --color-brand: red; }");
  }
}
```

## How to fix

- With an official integration, update the Stillwind packages. If the error
  remains, report it.
- In your own integration, give only the root stylesheet first, and answer the
  later requests with the IDs that the loader returns.

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