我正在使用 Expo 和 Snack 并不断收到此错误
Unable to resolve module 'module://expo-font.js' Evaluating module://expo-font.js Evaluating module://react-native-elements.js ...
我没有导入任何字体,通过跟踪上面的路径,可以看到它在“react-native-elements”模块中出现错误
这是package.json中的依赖项
"react-native-elements": "0.19.1",
"react-navigation": "1.0.0-beta.27",
"react-native-animatable": "1.3.0",
"react-redux": "5.0.7",
"redux": "4.0.0",
"redux-logger": "3.0.6",
"redux-persist": "5.10.0",
"redux-persist/lib/storage": "5.10.0"
在导出之前我也无法访问小吃上的 App.json 文件
过去将react-native-elements版本更改为较低的版本会破解它,但这似乎不再起作用
最佳答案
我通过导入“expo-font”解决了这个问题
npm i expo-font
关于javascript - 无法解析模块 'expo-font.js',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53337200/