试图安装firebase-tools并得到一个奇怪的错误

时间:2017-08-09 17:16:41

标签: javascript reactjs firebase npm firebase-tools

我尝试在firebase上部署我的应用并遵循教程。我跑了npm install -g firebase-tools并收到以下错误:

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
/usr/local/bin/firebase -> /usr/local/lib/node_modules/firebase-tools/bin/firebase

> iltorb@1.3.4 install /usr/local/lib/node_modules/firebase-tools/node_modules/iltorb
> node-pre-gyp install --fallback-to-build

[iltorb] Success: "/usr/local/lib/node_modules/firebase-tools/node_modules/iltorb/build/bindings/encode.node" is installed via remote

> node-zopfli@1.4.0 install /usr/local/lib/node_modules/firebase-tools/node_modules/node-zopfli
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://node-zopfli.s3.amazonaws.com/Release/zopfli-v1.4.0-node-v57-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for node-zopfli@1.4.0 and node@8.2.1 (node-v57 ABI) (falling back to source compile with node-gyp)
  CXX(target) Release/obj.target/zopfli/src/zopfli-binding.o
  CXX(target) Release/obj.target/zopfli/src/png/zopflipng.o
  CC(target) Release/obj.target/zopfli/zopfli/src/zopfli/blocksplitter.o
  CC(target) Release/obj.target/zopfli/zopfli/src/zopfli/cache.o
  CC(target) Release/obj.target/zopfli/zopfli/src/zopfli/deflate.o
  CC(target) Release/obj.target/zopfli/zopfli/src/zopfli/gzip_container.o
  CC(target) Release/obj.target/zopfli/zopfli/src/zopfli/hash.o
  CC(target) Release/obj.target/zopfli/zopfli/src/zopfli/katajainen.o
  CC(target) Release/obj.target/zopfli/zopfli/src/zopfli/lz77.o
  CC(target) Release/obj.target/zopfli/zopfli/src/zopfli/squeeze.o
  CC(target) Release/obj.target/zopfli/zopfli/src/zopfli/tree.o
  CC(target) Release/obj.target/zopfli/zopfli/src/zopfli/util.o
  CC(target) Release/obj.target/zopfli/zopfli/src/zopfli/zlib_container.o
  CC(target) Release/obj.target/zopfli/zopfli/src/zopfli/zopfli_lib.o
  CXX(target) Release/obj.target/zopfli/zopfli/src/zopflipng/zopflipng_lib.o
  CXX(target) Release/obj.target/zopfli/zopfli/src/zopflipng/lodepng/lodepng.o
  CXX(target) Release/obj.target/zopfli/zopfli/src/zopflipng/lodepng/lodepng_util.o
  SOLINK_MODULE(target) Release/zopfli.node
  COPY /usr/local/lib/node_modules/firebase-tools/node_modules/node-zopfli/lib/binding/node-v57-darwin-x64/zopfli.node
  TOUCH Release/obj.target/action_after_build.stamp

> grpc@1.4.1 install /usr/local/lib/node_modules/firebase-tools/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: "/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary/grpc_node.node" is installed via remote

> @google-cloud/functions-emulator@1.0.0-alpha.23 postinstall /usr/local/lib/node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator
> node scripts/upgrade-warning


If you're upgrading @google-cloud/functions-emulator, these
are the recommended upgrade steps:

1.  Stop the currently running emulator, if any:

        functions stop

2.  Uninstall the current emulator, if any:

        npm uninstall -g @google-cloud/functions-emulator

3.  Install the new version of the emulator:

        npm install -g @google-cloud/functions-emulator

If you have trouble after upgrading, try deleting the config
directory found in:

    ~/.config/configstore/@google-cloud/functions-emulator

Then restart the emulator. You can also check for any renegade
Node.js emulator processes that may need to be killed:

    ps aux | grep node

+ firebase-tools@3.9.2
added 786 packages in 52.365s

我尝试按照有关模拟器的步骤进行操作,但它似乎无法正常工作。由于我从未与Firebase合作,因此我不能完全确定它是在问我什么。

我正在使用:

npm -v 5.3.0 node -v v8.2.1

这是一个使用Yelp-fusion API并运行快速服务器的单页React应用程序。

1 个答案:

答案 0 :(得分:1)

你可以尝试下面对我有用的命令,

npm install -g --unsafe-perm firebase-tools