无法使用npm安装Firebase CLI
我首先安装了节点和npm
Ahmads-MacBook-Pro:~ ahmadbazzi$ npm --version
5.6.0
Ahmads-MacBook-Pro:~ ahmadbazzi$ node --version
v8.9.4
然后,我按照此处 CLI。我先执行
Ahmads-MacBook-Pro:~ ahmadbazzi$ npm install -g firebase-tools
给了我很多警告
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN checkPermissions Missing write access to /Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @google-cloud/[email protected] (node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator):
npm WARN 404 SKIPPING OPTIONAL DEPENDENCY: Not Found: @google-cloud/[email protected]
以及一大堆错误
npm ERR! path /Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools'
npm ERR! { Error: EACCES: permission denied, access '/Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools\'',
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools' }`
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/ahmadbazzi/path to npmrc folder/_logs/2018-01-23T17_29_19_771Z-debug.log
回答如下:尝试各种方法:
反复尝试卸载并重新安装。有时问题可以解决。
npm uninstall -g firebase-tools; npm install -g firebase-tools
检查错误消息中文件的特定权限。您对它们有写权限吗?如果不这样做,是否可能需要使用
sudo
来编写它们?完全吹走它要安装的位置,对您来说显然是
/Users/ahmadbazzi/.npm-global
。
无法使用npm安装Firebase CLI
我首先安装了节点和npm
Ahmads-MacBook-Pro:~ ahmadbazzi$ npm --version
5.6.0
Ahmads-MacBook-Pro:~ ahmadbazzi$ node --version
v8.9.4
然后,我按照此处 CLI。我先执行
Ahmads-MacBook-Pro:~ ahmadbazzi$ npm install -g firebase-tools
给了我很多警告
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN checkPermissions Missing write access to /Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @google-cloud/[email protected] (node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator):
npm WARN 404 SKIPPING OPTIONAL DEPENDENCY: Not Found: @google-cloud/[email protected]
以及一大堆错误
npm ERR! path /Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools'
npm ERR! { Error: EACCES: permission denied, access '/Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools\'',
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools' }`
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/ahmadbazzi/path to npmrc folder/_logs/2018-01-23T17_29_19_771Z-debug.log
回答如下:尝试各种方法:
反复尝试卸载并重新安装。有时问题可以解决。
npm uninstall -g firebase-tools; npm install -g firebase-tools
检查错误消息中文件的特定权限。您对它们有写权限吗?如果不这样做,是否可能需要使用
sudo
来编写它们?完全吹走它要安装的位置,对您来说显然是
/Users/ahmadbazzi/.npm-global
。