【问题标题】:unable to install firebase tools in windows无法在 Windows 中安装 Firebase 工具
【发布时间】:2026-02-01 00:10:01
【问题描述】:

您好,我无法使用管理员模式通过命令提示符安装 firebase 工具,并且出现以下错误:

F:\rnd\MyChat>npm install  firebase

> grpc@1.8.4 install F:\rnd\MyChat\node_modules\grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.8.4/node-v57-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.8.4 and node@8.9.3 (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:\Users\ani\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.8.4 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.8.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

【问题讨论】:

标签: windows firebase npm firebase-tools


【解决方案1】:

您正在尝试安装 firebase javascript 库而不是 firebase-tools firebase 工具的节点模块是 firebase-tools 和 firebase 3.16 版本以及本地文件夹中的 npm install node-gyp

你应该跑

npm install -g firebase-tools

【讨论】:

  • 我正在尝试同时安装 firebase 工具和 firebase,并且在输入命令后我收到这些错误 npm WARN deprecated node-uuid@1.4.8: Use uuid module instead & > grpc@1.8.4安装 F:\rnd\MyChat\node_modules\grpc > node-pre-gyp install --fallback-to-build --library=static_library
  • 尝试运行这个npm install -g node-pre-gyp你得到了什么?
  • Installed your command below is the response im getting + node-pre-gyp@0.6.39 added 113 packages in 66.884s
  • npm WARN 已弃用 node-uuid@1.4.8:使用 uuid 模块代替 C:\Users\ani\AppData\Roaming\npm\firebase -> C:\Users\ani\AppData\Roaming\ npm\node_modules\firebase-tools\bin\firebase > grpc@1.4.1 安装 C:\Users\ani\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc > node-pre-gyp install --fallback -to-build --library=static_library node-pre-gyp ERR!尝试下载(未定义):storage.googleapis.com/grpc-precompiled-binaries/node/grpc/… node-pre-gyp ERR!未找到 grpc@1.4.1 和 node@8.9.4 的预构建二进制文件(node-v57 ABI
【解决方案2】:

这可能有效,请尝试执行以下操作。

npm i -g firebase-tools

【讨论】:

    【解决方案3】:

    按照以下步骤,我的问题终于解决了

    首先我在我的本地文件夹中安装了 npm install node-gyp 并将我的 firebase-tools 版本从 3.17 降级到 3.16,主要是我禁用了我的防病毒软件 下面是那个的参考链接

    https://github.com/grpc/grpc-node/issues/121

    【讨论】:

      【解决方案4】:

      如果您使用的是较新版本的 nodejs,请尝试卸载并使用 node-v10.15.3

      https://nodejs.org/download/release/v10.15.3/

      【讨论】: