无法在 windows 中安装 firebase 工具

unable to install firebase tools in windows

您好,我无法使用管理员模式通过命令提示符安装 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.

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

npm i -g firebase-tools

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

你应该运行

npm install -g firebase-tools

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

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

的参考 link

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

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

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