gpt4 book ai didi

node.js - 安装 firebase-admin 时出错

转载 作者:太空宇宙 更新时间:2023-11-03 22:08:45 26 4
gpt4 key购买 nike

当我使用“npm install --save firebase-admin”在 Node js 中安装 firebase-admin 时。我看一下这个问题:

node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v57-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.7.3 and node@8.9.4 (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library
" "--module=D:\\Developpement\\STage\\ITGate Sousse\\NodeJs\\AdminSDKFirebase\\project\\node_modules\\grpc\\src\\node\\extension_binary\\node-v57-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_no
de" "--module_path=D:\\Developpement\\STage\\ITGate Sousse\\NodeJs\\AdminSDKFirebase\\project\\node_modules\\grpc\\src\\node\\extension_binary\\node-v57-win32-x64-unknown"
gyp ERR! cwd D:\Developpement\STage\ITGate Sousse\NodeJs\AdminSDKFirebase\project\node_modules\grpc
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error

D:\Developpement\STage\ITGate Sousse\NodeJs\AdminSDKFirebase\project>npm install --save firebase-admin
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

解决办法是什么???谢谢你

最佳答案

错误本身是不言自明的。

它会查找 python 可执行文件,您必须执行以下操作:

  • 下载适当的 Python 版本
  • 创建PYTHON环境变量
  • 将其添加到您的路径

关于node.js - 安装 firebase-admin 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48750612/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com