当我在节点js中使用" npm install --save firebase-admin"安装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
解决方案是什么? 谢谢
答案 0 :(得分:1)
错误本身是不言自明的。
它查找python可执行文件,您必须执行以下操作:
PYTHON
环境变量Path