Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Native Metro transformer crashes on Expo's @expo/log-box CSS modules with Specifier deserialization error

Ouverte
#293 0 commentaires 2 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 3 jours

@danstepanov y travaille déjà.

Depuis le 15/7/2026.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

v5 stability

Native Metro transformer crashes on Expo's @expo/log-box CSS modules with failed to deserialize; expected an object-like struct named Specifier

Summary

I hit a crash in react-native-css while following the Nativewind v5 setup on a fresh Expo 55 app.

The failure is triggered when Expo's own @expo/log-box CSS modules are sent through the native react-native-css Metro transformer. A direct compile of @expo/log-box/src/overlay/Overlay.module.css reproduces the same error outside Metro.

I do not think this is the same issue as CSS @property support. That appears to be covered separately by PR #284. This issue seems to be about react-native-css trying to compile framework-owned CSS that should be left to Expo's normal CSS handling.

Environment

  • expo: ~55.0.5
  • react-native: 0.83.2
  • nativewind: ^5.0.0-preview.2
  • react-native-css: ^3.0.4
  • package manager: bun
  • Node: v25.7.0

Minimal reproduction

Published repro repo:

Fast repro:

bun install
bun run repro:logbox

Current output:

Compiling node_modules/@expo/log-box/src/overlay/Overlay.module.css with react-native-css...
Error: failed to deserialize; expected an object-like struct named Specifier, found ()

The reproduction app itself uses the simple documented Nativewind Metro setup:

const { getDefaultConfig } = require("expo/metro-config");
const { withNativewind } = require("nativewind/metro");

module.exports = withNativewind(getDefaultConfig(__dirname));

Additional context

Expo's @expo/log-box package appears to own its CSS handling already:

  • it ships CSS modules under @expo/log-box/src/overlay/*.module.css
  • it has its own metro.config.js
  • it has a dedicated shadowDomCssTransformer.js

Because react-native-css replaces Metro's transformer globally, these Expo overlay files end up going through the native CSS compile path instead.

Expected behavior

react-native-css should not try to compile Expo log-box CSS modules with the native compiler on iOS/Android. Those files should be passed through Expo's default CSS handling so Nativewind can coexist with Expo's error overlay.

Actual behavior

The native CSS compiler crashes with:

Error: failed to deserialize; expected an object-like struct named Specifier, found ()

Proposed direction

A small Metro-level bypass for node_modules/@expo/log-box/**/*.css seems like the safest fix:

  • keep normal native compilation for app CSS and Nativewind input
  • skip native compilation for Expo's log-box CSS
  • delegate those files to the default Expo transformer

I have a local patch sketch for this if that direction sounds acceptable.

Langage dominant
TypeScript
Étoiles
166
Forks
45
Merge moyen
13 j 14 h
PR mergées (30 j)
1

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de nativewind/react-native-css

Toutes les issues de nativewind/react-native-css

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.