Skip to content

SW10003: Invalid Unicode string

A string used to generate CSS or resolve a module contains a lone Unicode surrogate.

This error occurs when a static string contains an unpaired UTF-16 surrogate. Stillwind requires well-formed Unicode in strings that it compiles, including utility strings, declaration labels, and module specifiers.

Reported

export const props = style("content-['\uD800']");

SW10003: string contains invalid Unicode

Fixed

export const props = style("content-['\u{1F600}']");

How to fix

Complete the surrogate pair, use a valid code point with \u{...}, or remove the invalid escape. Strings that Stillwind leaves for runtime evaluation can still contain lone surrogates.