【发布时间】:2018-07-02 15:05:23
【问题描述】:
我首先安装了node和npm
Ahmads-MacBook-Pro:~ ahmadbazzi$ npm --version
5.6.0
Ahmads-MacBook-Pro:~ ahmadbazzi$ node --version
v8.9.4
然后我按照此处https://firebase.google.com/docs/functions/get-started 的步骤安装firebase CLI。 我先执行了
Ahmads-MacBook-Pro:~ ahmadbazzi$ npm install -g firebase-tools
这给了我一大堆警告
npm WARN deprecated node-uuid@1.4.8: 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/functions-emulator@1.0.0-alpha.23 (node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator):
npm WARN 404 SKIPPING OPTIONAL DEPENDENCY: Not Found: @google-cloud/functions-emulator@1.0.0-alpha.23
还有一大堆错误
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
【问题讨论】:
标签: node.js firebase npm npm-install firebase-tools