您好我无法使用管理员模式通过命令提示符安装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.
答案 0 :(得分:3)
您正在尝试安装firebase
javascript库而不是firebase-tools
firebase工具的节点模块是firebase-tools
和firebase 3.16版本以及本地文件夹{{1} }
你应该跑
npm install node-gyp
答案 1 :(得分:0)
这可能有用,请尝试执行以下操作。
npm i -g firebase-tools
答案 2 :(得分:0)
最后,通过以下步骤解决了我的问题
首先我在我的本地文件夹中安装了 npm install node-gyp
,并将我的firebase-tools版本从3.17降级到3.16,主要是我禁用了我的反病毒
以下是该
答案 3 :(得分:0)
如果您正在使用新版本的nodejs,请尝试卸载并使用node-v10.15.3