This error occurs when an integration answers a request that the stylesheet loader is not waiting for. The request ID is unknown, or the request already has an answer.
Reported
import { NativeDesignSystemLoader } from "@stillwind/native";
const loader = new NativeDesignSystemLoader();
loader.provide(0, "root.css", '@import "./tokens.css";');
loader.provide(99, "tokens.css", "@theme { --color-brand: red; }");SW32003: unknown or duplicate request ID 99
Fixed
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, keep the request state for each loader, and do not pass late answers from an earlier load to a new one.