javascript - npm 无法在 expo-cli React Native 中为 Firebase 安装 grpc@1.24.2
问题描述
当我尝试为我的 expo 项目安装 firebase 包进行身份验证时,它无法安装包并引发一些意外错误。
用于安装 firebase 包的命令
expo install firebase
错误
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.24.2 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.24.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Saswat\AppData\Roaming\npm-cache\_logs\2021-01-04T02_22_39_477Z-debug.log
npm exited with non-zero code: 1
环境
node: 14.15.0
expo-cli: 4.0.13
expo-sdk: 40.0.0
请帮助解决我的问题
解决方案
尝试这个:
删除锁定文件和 node_modules 目录
获取最新版本的 firebase
npm install --save-exact --save firebase@latest
检查漏洞
npm audit fix
然后运行安装
npm install
那些还在挣扎的人...
推荐阅读
- python-3.x - Google Cloud Speech-to-Text 非侵入式最终用户身份验证
- powershell - powershell中所有收集数据的输出逻辑
- javascript - 如何将 NodeJS 脚本连接到 ReactJS
- javascript - Firebase 云功能无法正确记录
- excel - 如何根据另一列中的值对列的一部分求和?
- python - RuntimeError:生成器引发 StopIteration
- apache-kafka - 当分区暂停并发生重新平衡时会发生什么?
- exception - 处理 ImageResizer.AzureReader2 (BlobNotFound) 抛出的 FileNotFoundException
- apache-spark - 在 Spark 中,如何在不重新分配的情况下重命名数据框的列名?
- php - 如何针对 XSS 验证 CakePHP 3 字段输入,同时允许文本输入的多种用途?