【问题标题】:Cannot find module '@babel\runtime\package.json'找不到模块'@babel\runtime\package.json'
【发布时间】:2020-10-09 11:28:00
【问题描述】:

我尝试运行我的应用程序,但突然出现此错误。

警告包 @babel/runtime 已被忽略,因为它包含无效配置。原因:找不到模块'@babel\runtime\package.json'

但我在 package.json 中有 @babel\runtime 这是 package.json 的文件

    {
  "name": "rasa",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "deprecated-react-native-listview": "0.0.6",
    "react": "16.11.0",
    "react-native": "0.62.2",
    "react-native-responsive-dimensions": "^3.1.1"
  },
  "devDependencies": {
    "@babel/core": "^7.6.2",
    "@babel/runtime": "^7.6.2",
    "@react-native-community/eslint-config": "^0.0.5",
    "babel-jest": "^24.9.0",
    "eslint": "^6.5.1",
    "jest": "^24.9.0",
    "metro-react-native-babel-preset": "^0.58.0",
    "react-test-renderer": "16.11.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

我该如何解决,我不想再次初始化我的项目,有没有办法解决这个问题?

【问题讨论】:

    标签: react-native babeljs package.json


    【解决方案1】:

    也许在命令行中尝试npm install 并再次运行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-03-23
      • 2017-10-13
      • 2017-05-05
      • 1970-01-01
      • 2016-07-14
      • 2022-06-10
      • 2020-01-01
      • 2019-01-14
      相关资源
      最近更新 更多