首页 文章

安装firebase时出错

提问于
浏览
0

我正在尝试使用firebase作为我的数据库 . 我运行 npm install angularfire2 firebase --save 并得到以下错误堆栈:

C:\ Users \ Batbrain \ Desktop \ Angular5 \ GitHub \ travelapp> npm install angularfire2 firebase --save grpc@1.9.0 install C:\ Users \ Batbrain \ Desktop \ Angular5 \ GitHub \ travelapp \ node_modules \ grpc node-pre -gyp install --fallback-to-build --library = static_library node-pre-gyp ERR!试图下载(未定义):https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.9.0/node-v57-win32-x64-unknown.tar.gz node-pre-gyp ERR !找不到grpc@1.9.0和node@8.9.4(node-v57 ABI,未知)的预构建二进制文件(使用node-gyp回退到源代码编译)gyp ERR!配置错误gyp ERR! stack错误:找不到Python可执行文件“python”,可以设置PYT HON env变量 . gyp ERR!堆栈在PythonFinder.failNoPython(C:\ Program Files \ nodejs \ node_mo dules \ npm \ node_modules \ node-gyp \ lib \ configure.js:483:19)gyp ERR!在PythonFinder堆栈 . (C:\ Program Files \ nodejs \ node_mod ules \ npm \ node_modules \ node-gyp \ lib \ configure.js:508:16)gyp ERR!堆栈在C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ grac eful-fs \ polyfills.js:284:29 gyp ERR!堆栈在FSReqWrap.oncomplete(fs.js:152:21)gyp ERR!系统Windows_NT 6.3.9600 gyp ERR!命令“C:\ Program Files \ nodejs \ node.exe”“C:\ Program Files \ nodej s \ node_modules \ npm \ node_modules \ node-gyp \ bin \ node-gyp.js”“configure”“ - f allback -to-build“” - library = static_library“” - module = C:\ Users \ Batbrain \ Desk top \ Angular5 \ GitHub \ travelapp \ node_modules \ grpc \ src \ node \ extension_binar y \ node-v57-win32- x64-unknown \ grpc_node.node“” - module_name = grpc_node“” - mode le_path = C:\ Users \ Batbrain \ Desktop \ Angular5 \ GitHub \ travelapp \ node_modules \ \ grpc \ src \ node \ extension_binary \ node-v57 -win32-x64-unknown“gyp ERR! cwd C:\ Users \ Batbrain \ Desktop \ Angular5 \ GitHub \ travelapp \ node_modules \ gr pc gyp ERR! node -v v8.9.4 gyp ERR! node-gyp -v v3.6.2 gyp ERR!不好节点-pre-gyp ERR!构建错误node-pre-gyp ERR!堆栈错误:无法执行'C:\ Program Files \ nodejs \ node.e xe C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ node-gyp \ bin \ node-gyp.js configure --fallback-to -build --library = static_library --module = C:\ Users \ Batbr ain \ Desktop \ Angular5 \ GitHub \ travelapp \ node_modules \ grpc \ src \ node \ extension_binar y \ node-v57-win32-x64-unknown \ grpc_node . node --module_name = grpc_node --module_pat h = C:\ Users \ Batbrain \ Desktop \ Angular5 \ GitHub \ travelapp \ node_modules \ grpc \ src \ node \ extension_binary \ node-v57-win32-x64-unknown'(1)node -pre-gyp ERR!在ChildProcess堆栈 . (C:\ Users \ Batbrain \ Deskt op \ Angular5 \ GitHub \ travelapp \ node_modules \ grpc \ node_modules \ node-pre-gyp \ lib \ uti l \ compile.js:83:29)node-pre-gyp ERR!堆栈在emitTwo(events.js:126:13)node-pre-gyp ERR!堆栈在ChildProcess.emit(events.js:214:7)node-pre-gyp ERR!堆栈在maybeClose(internal / child_process.js:925:16)node-pre-gyp ERR!在Process.ChildProcess._handle.onexit(internal / chi ld_process.js:209:5)中的堆栈节点pre-gyp ERR!系统Windows_NT 6.3.9600 node-pre-gyp ERR!命令“C:\ Program Files \ nodejs \ node.exe”“C:\ Users \ Batb rain \ Desktop \ Angular5 \ GitHub \ travelapp \ node_modules \ grpc \ node_modules \ node-pre-gyp \ bin \ node-pre-gyp “”install“” - fallback-to-build“” - library = static _library“node-pre-gyp ERR! cwd C:\ Users \ Batbrain \ Desktop \ Angular5 \ GitHub \ travelapp \ node_m odules \ grpc node-pre-gyp ERR! node -v v8.9.4 node-pre-gyp ERR! node-pre-gyp -v v0.6.39 node-pre-gyp ERR!不行无法执行'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 = C:\ Users \ Batbrain \ Desktop \ Angular5 \ GitHub \ tra velapp \ node_modules \ grpc \ src \ node \ extension_binary \ node-v57-win32-x64-unknown \ gr pc_node.node --module_name = grpc_node --module_path = C:\ Users \ Batbrain \ Desktop \ Ang ular5 \ GitHub \ travelapp \ node_modules \ grpc \ src \ node \ extension_binary \ node-v57-win3 2-x64-unknown'(1)npm WARN可选SKIPPING OPTIONAL DEPENDENCY:fsevents@1.1.3(node_modules \ fse vents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY:不支持的fsevents平台@ 1.1.3:want {“os”:“darwin”,“arch”:“any “}(当前:{”os“:”win32“,”arch“:”x64“})npm ERR!代码ELIFECYCLE npm ERR!错误1 npm ERR! grpc@1.9.0 install:node-pre-gyp install --fallback-to-build --library = static_library npm ERR!退出状态1 npm ERR!错误的ERR! grpc@1.9.0安装脚本失败 . 错误的ERR!这可能不是npm的问题 . 可能还有额外的日志记录以上输出 . 错误的ERR!可以在以下位置找到此运行的完整日志:npm ERR! C:\ Users \ Batbrain \ AppData \ Roaming \ npm-cache_logs \ 2018-02-15T04_11 21_993Z-debug.log

这是我的环境细节:

  • Angular CLI:1.6.8

  • 节点:8.9.4

  • 操作系统:win32 x64

  • Angular:5.2.4

  • @ angular / cdk:5.2.0

  • @ angular / cli:1.6.8

  • @ angular / material:5.2.0

  • @ angular-devkit / build-optimizer:0.0.42

  • @ angular-devkit / core:0.0.29

  • @ angular-devkit / schematics:0.0.52

  • @ ngtools / json-schema:1.1.0

  • @ ngtools / webpack:1.9.8

  • @ schematics / angular:0.1.17

  • 打字稿:2.5.3

  • webpack:3.10.0

  • npm 5.6.0

1 回答

  • 1

    Error

    回答

    只需退出防病毒软件并再次运行即可 . 它对我有用

    After Fix

相关问题