reactjs - 无法加载我的反应原生项目的配置
问题描述
./gradlew clean
android 目录中的命令也有问题。我试过降级 npm 版本但没有帮助。有任何想法吗?
以下是我运行时得到的日志npx react-native run-android
:
error Failed to load configuration of your project.
Error: Cannot find module '...\node_modules\json-parse-better-errors\index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:320:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:533:18)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:875:27)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (D:\projects\Beauty\node_modules\parse-json\index.js:3:18)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
环境:
操作系统:Windows 10
本机反应:0.65.1
节点:14.17.4
npm:7.23.0
解决方案
推荐阅读
- gcc - obj-copy 忽略一些填充
- angular - 无法在代码共享项目中使用 Nativescript Localstorage 插件
- java - Java如何遍历3个arrayList
- laravel - 如何在 laravel 的刀片中添加布局?
- vba - 连接单元格但之前检查值 - Excel VBA
- objective-c - Xcode 10 GM 种子:NS_OPTIONS(选项的 objc 导出)不再编译
- gradle - 您如何在 gradle 中并行运行 ScalaTest 测试套件?
- java - 如何使用迭代器访问类的这些元素?
- google-cloud-dataflow - 在语句中使用聚合时 Beam SQL 不起作用:“无法计划执行”
- python - setuptools:load_entry_point 上的 ImportError