我最近在我的应用程序中实现了黑暗模式,但是在用npm build
构建npm包时出现了错误。代码可以工作,但是是否存在删除此错误的方法或原因?
误差
src/ContactActionSheet.tsx:3:10 - error TS2305: Module '"react-native"' has no exported member 'Appearance'.
3 import { Appearance, Dimensions, StyleSheet, Text, View, Linking, TouchableOpacity } from 'react-native';
JSX
// Imports: Dependencies
import { Appearance, Dimensions, StyleSheet, Text, View, Linking, TouchableOpacity } from 'react-native';
// Dark Mode
const colorScheme = Appearance.getColorScheme();
发布于 2020-08-10 05:12:51
问题是需要更新国家预防机制一揽子@types/react-native
。
https://stackoverflow.com/questions/63334338
复制相似问题