无法解析展览字体。急速模块图中不存在Expo模块

时间:2019-06-24 13:45:17

标签: reactjs react-native

我的 package.json 看起来像这样,我遇到了一个无法解析expo-font的错误。请帮助我解决此问题。

{
    "name": "myProject",
    "version": "0.0.1",
    "private": true,
    "scripts": {
        "start": "react-native start",
        "android": "react-native run-android",
        "ios": "react-native run-ios"
    },
    "dependencies": {
    "@babel/polyfill": "^7.4.4",
    "@babel/runtime": "^7.4.5",
    "@expo/vector-icons": "^10.0.2",
    "express": "^4.17.1",
    "react": "16.6.0-alpha.8af6728",
    "react-native": "0.57.5",
    "react-native-gesture-handler": "^1.3.0",
    "react-native-vector-icons": "^6.5.0",
    "react-navigation": "^3.11.0",
    "redux": "^4.0.1",
    "socket.io": "^2.2.0",
    "socket.io-client": "^2.2.0"
    },
    "devDependencies": {
    "@babel/core": "^7.4.5",
    "@babel/plugin-transform-runtime": "^7.4.4",
    "babel-preset-expo": "^5.0.0"
    }
}

1 个答案:

答案 0 :(得分:0)

我刚刚找到解决方案。 rm -rf /tmp/metro-cache 这样可以解决问题。