帮助:我的 expo+nativewind 项目在网页(Chrome)上运行良好,但在 Android + expoGo 上出现错误。

发布: (2026年2月3日 GMT+8 12:35)
1 min read
原文: Dev.to

Source: Dev.to

问题描述

我创建了一个 Expo 项目,并按照官方文档配置了 Nativewind v5https://www.nativewind.dev/v5/getting-started/installation)。

该项目在网页(Chrome)上运行正常,但在 Android 设备的 Expo Go 上运行时会抛出错误。

错误输出

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

    at compile (E:\code\expo\nativewindV5\node_modules\react-native-css\dist\commonjs\compiler\compiler.js:98:7)

    at Object.transform (E:\code\expo\nativewindV5\node_modules\react-native-css\dist\commonjs\metro\metro-transformer.js:23:45)

截图

在网页上正常工作

Web screenshot

Android(Expo Go)上的错误

Android error 1

Android error 2

Back to Blog

相关文章

阅读更多 »

# Expo 与 Bare React Native

概述:Expo 已从仅“受管”解决方案演变为完整工具包,必要时仍可弹出到裸工作流。以下是 Expo v… 的比较。

Termux

文章 URL: https://github.com/termux/termux-app 评论 URL: https://news.ycombinator.com/item?id=46854642 得分: 4 评论: 0