Skip to content

SW32005: CSS loader already completed

An answer reached the stylesheet loader after it finished loading.

This error occurs when an integration calls provide on a stylesheet loader that has already finished. A finished loader does not accept late answers or new revisions of a stylesheet.

Reported

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

const loader = new NativeDesignSystemLoader();
loader.provide(0, "root.css", ".card { color: red; }");
loader.provide(0, "root.css", ".card { color: blue; }");

SW32005: provide called after completion

Fixed

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

const loader = new NativeDesignSystemLoader();
loader.provide(0, "root.css", ".card { color: red; }");
const next = loader.newLoader();
next.provide(0, "root.css", ".card { color: blue; }");

How to fix

  • With an official integration, update the Stillwind packages. If the error remains, report it.
  • In your own integration, cancel or ignore pending file reads when a load ends, and keep the answers of each load separate.