【问题标题】:Cannot find module ‘expo/tools/LogReporter’找不到模块‘expo/tools/LogReporter’
【发布时间】:2019-06-20 13:17:29
【问题描述】:

我尝试使用 expo start 运行我的第一个 react-native 应用程序,但出现以下错误 找不到模块‘expo/tools/LogReporter’

我发现了几个关于这个问题的问题并关注,但没有一个不能解决我的问题(我检查了所有这些问题,并按照他们说的做了)

包.json:

{
“main”: “node_modules/expo/AppEntry.js”,
“scripts”: {
“start”: “expo start”,
“android”: “expo start --android”,
“ios”: “expo start --ios”,
“eject”: “expo eject”
},
“dependencies”: {
“expo”: “^32.0.0”,
“react”: “16.5.0”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz”
},
“devDependencies”: {
“babel-preset-expo”: “^5.0.0”
},
“private”: true,
“name”: “sample”,
“version”: “1.0.0”,
“author”: “Jahanmir”,
“license”: “ISC”,
“description”: “”
}

【问题讨论】:

    标签: reactjs react-native expo


    【解决方案1】:

    您是否检查过是否在您的 node_modules 中找到了它? 在这种情况下,我通常会删除 node_modules 文件夹并运行 npm install,这将重新安装所有节点模块。

    【讨论】:

    • 这告诉你的是,git 没有在系统路径中定义。你安装了 git 吗?如果没有,请安装 git,然后查看 stackoverflow.com/questions/26620312/… 将其添加到路径中
    • @Defrain 我做到了,删除文件夹并运行 npm install expo-cli 但再次出现同样的错误
    • 你能不能尝试打开cmd终端输入git --version
    • git 版本 2.20.1.windows.1
    • 下面的答案是否解决了问题?如果没有:我在哪里可以找到完整的错误消息?
    猜你喜欢
    • 2019-10-12
    • 1970-01-01
    • 1970-01-01
    • 2023-01-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-10
    • 2020-04-01
    相关资源
    最近更新 更多