安装Firebase工具时遇到麻烦 [英] Troubling with installing firebase-tools

查看:188
本文介绍了安装Firebase工具时遇到麻烦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装节点和npm之后,我尝试在计算机上安装firebase-tools(因为云功能).这是我看到的:

After installing node and the npm, I tried installing firebase-tools on my computer (because cloud functions). This is what I see:

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/firebase-tools
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/firebase-tools/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/firebase-tools/node_modules/@google-cloud
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules/firebase-tools
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/firebase-tools'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/firebase-tools'
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/firebase-tools\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules/firebase-tools' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/joeljohnson/.npm/_logs/2018-01-26T16_56_29_829Z-debug.log

我还没有找到解决问题的方法,我该如何解决?

I haven't found a solution to my problem yet, how can I resolve this?

推荐答案

我能够解决此问题.问题在于软件包"grpc".我不知道错误的确切性质,但是通过反复试验,我移到了Firebase的安装目录,并手动安装了grpc. 的命令.

I was able to fix this. The problem is with the package 'grpc'. I don't know the exact nature of error but through trial and error i moved to the the directory where firebase was installed and installed grpc manually. Commands for that are.

sudo npm install -g firebase-tools #This will give errors but let it be
cd /usr/lib/node_modules/firebase-tools/
sudo npm install grpc@1.4.1
sudo npm install -g firebase-tools

这篇关于安装Firebase工具时遇到麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆