Skip to content

Nativewind with react-native-skia causing non-whitespace character found error #243

Closed

Description

@araskihu

Describe the bug
We are using nativewind v5 preview 2 and @shopify/react-native-skia version 2.2.12. Before installing react native skia everything worked fine, however after installing we got this error: [Error: Exception in HostFunction: Non-whitespace character found after end of conversion: "%"]. This error only comes up when we have elements with className properties. But after removing nativewind and react-native-css the error disappears.

Reproduction
Repo Link

⚠️ Important: Issues without a valid reproduction link will not be reviewed and will be automatically closed. Use the rn-new template to create a reproduction:

  • npx rn-new@latest --nativewind
  • npx rn-new@latest --nativewind --expo-router
  • npx rn-new@next --nativewind
  • npx rn-new@next --nativewind --expo-router

If you have a usage question, please use the Discord or GitHub Discussions instead.

Expected behavior
App should work as before, no non-whitespace error should come up.

Additional context
—

Activity

  1. moved this to Todo in Roadmapon Mar 26, 2026
  2. danstepanov commented on Mar 30, 2026

    @danstepanov
    Member

    I investigated your repro. The crash is caused by ios:tracking-[-2%] compiling to letterSpacing: "-2%" (string). React Native's native layer can't parse the % suffix. This is the same root cause as #216 where scale-95 emits "95%" instead of 0.95. Both stem from parseLength in the compiler emitting percentage strings for properties that require numeric values. The fix needs to go in react-native-css's compiler with context-aware percentage handling.

    Subsequently, I'm closing this as duplicate of #216.

  3. moved this from Todo to Done in Roadmapon Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions