react-native - 反应本机初始化失败
问题描述
每当我创建一个新项目时,它都会引发以下错误。我确实更新了任何设置。昨天之前一切正常。这是我的问题。
[1/4] Resolving packages...
error Couldn't find package **"@typescript-eslint/parser@^4.22.1"** required by **"@react-native-community/eslint-config"** on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
E:\example\project\node_modules\execa\index.js:174
err = new Error(`Command failed: ${joinedCmd}${output}`);
^
Error: Command failed: yarn add -D @babel/core @babel/runtime @react-native-community/eslint-config eslint jest babel-jest metro-react-native-babel-preset react-test-renderer@17.0.1
at makeError (E:\example\project\node_modules\execa\index.js:174:9)
at E:\example\project\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async generateProject (E:\example\project\node_modules\@react-native-community\cli\build\commands\init\initCompat.js:128:3)
at async Object.initCompat (E:\example\project\node_modules\@react-native-community\cli\build\commands\init\initCompat.js:105:3) {
code: 1,
stdout: null,
stderr: null,
failed: true,
signal: null,
cmd: 'yarn add -D @babel/core @babel/runtime @react-native-community/eslint-config eslint jest babel-jest metro-react-native-babel-preset react-test-renderer@17.0.1',
timedOut: false,
killed: false
}
我确实删除了一个节点,更新了节点,删除了 react-native-CLI,并对其进行了更新,并且修复了一段时间。但我无法安装任何软件包。
现在是第 2 天,我被困在这里。
解决方案
终于找了半天。我找到了解决方案。只需转到网络设置并关闭自动代理设置检测即可。
推荐阅读
- angularjs - AngularJs 组件内无法访问 Groovy 代码
- phpunit - phpunit testdox 对数据提供者的友好输出
- c# - 渲染图像时,HiQPdf 抛出“无法布局图像”
- r - 大规模申报清单的更清洁方法?
- c++ - 由于 Sigsegv 11 信号的回溯
- python - 何时在 Pandas 中使用 .count() 和 .value_counts()?
- javascript - 字符串化一个字符串还是空?
- firebase - firebase_messaging 插件出错
- python - onnx 错误为 - 模块“numpy”没有属性“dtype”
- c++ - 代码适用于示例运行,但提交失败:Hackerrank 问题