Node.js Firebase工具安装失败,npm错误!eNote eNote:没有这样的文件或目录

Node.js Firebase工具安装失败,npm错误!eNote eNote:没有这样的文件或目录,node.js,firebase,npm,firebase-cli,Node.js,Firebase,Npm,Firebase Cli,我正在尝试安装Firebase CLI,但出现以下错误: WARN tar EISDIR:目录上的非法操作,打开 '/usr/local/lib/node_模块/ 然后这个: npm错误!enoint enoint:没有这样的文件或目录,chmod “/usr/local/lib/node_modules/firebase/node_modules/grpc/node_modules/detect libc/bin/detect libc.js” 我尝试了sudo,然后: npm i -g fi

我正在尝试安装Firebase CLI,但出现以下错误:

WARN tar EISDIR:目录上的非法操作,打开 '/usr/local/lib/node_模块/

然后这个:

npm错误!enoint enoint:没有这样的文件或目录,chmod “/usr/local/lib/node_modules/firebase/node_modules/grpc/node_modules/detect libc/bin/detect libc.js”

我尝试了
sudo
,然后:

npm i -g firebase-tools --unsafe-perm
但它仍然不起作用


如何在没有错误的情况下安装firebase tools?

找到解决方案了吗?是的,此错误发生在MacOS 10上。我重新安装操作系统,它就开始工作了。