小编Kia*_*jad的帖子

在本机反应中出现“无法读取 null 的属性‘pickAlgorithm’”错误

我在运行时遇到错误npm install。错误是:

npm ERR! Cannot read property 'pickAlgorithm' of null

npm ERR! A complete log of this run can be found in:
npm ERR!    npm-cache\_logs\2021-10-14T08_03_47_266Z-debug.log
Run Code Online (Sandbox Code Playgroud)

我执行了以下操作,但错误仍然存​​在:

  1. 已删除node-modules
  2. 删除了给定的文件
  3. 跑步npm cache clear --force

环境:

操作系统:Windows 10
本机反应:0.65.1
节点:14.17.4
npm:7.21.0

npm react-native npm-install

136
推荐指数
8
解决办法
20万
查看次数

无法加载我的 React Native 项目的配置

./gradlew cleanandroid 目录中的命令也有问题。我尝试过降级 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)
Run Code Online (Sandbox Code Playgroud)

环境:

操作系统:Windows 10
本机反应:0.65.1
节点:14.17.4
npm:7.23.0

npm reactjs react-native

16
推荐指数
3
解决办法
5万
查看次数

标签 统计

npm ×2

react-native ×2

npm-install ×1

reactjs ×1