npm install -g firebase-tools 报错

问题描述 投票:0回答:0
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/firebase-tools
npm ERR! dest /usr/local/lib/node_modules/.firebase-tools-ENG41nb9
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/firebase-tools' -> '/usr/local/lib/node_modules/.firebase-tools-ENG41nb9'
npm ERR!  [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/firebase-tools' -> '/usr/local/lib/node_modules/.firebase-tools-ENG41nb9'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rename',
npm ERR!   path: '/usr/local/lib/node_modules/firebase-tools',
npm ERR!   dest: '/usr/local/lib/node_modules/.firebase-tools-ENG41nb9'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/avi/.npm/_logs/2023-02-19T08_22_34_901Z-debug-0.log

当我安装 CLI 时,这是错误,很可能你没有权限访问这个文件作为当前用户我不知道它要求任何帮助的权限

command-line-interface npm-install
© www.soinside.com 2019 - 2024. All rights reserved.