vorlon和cnpm都安装不了权限问题mac

vorlon和cnpm都安装不了权限问题mac

npm ERR! code EACCES

npm ERR! syscall symlink

npm ERR! path ../lib/node_modules/cnpm/bin/cnpm

npm ERR! dest /usr/local/bin/cnpm

npm ERR! errno -13

npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/cnpm/bin/cnpm' -> '/usr/local/bin/cnpm'

npm ERR!  [OperationalError: EACCES: permission denied, symlink '../lib/node_modules/cnpm/bin/cnpm' -> '/usr/local/bin/cnpm'] {

npm ERR!   cause: [Error: EACCES: permission denied, symlink '../lib/node_modules/cnpm/bin/cnpm' -> '/usr/local/bin/cnpm'] {

npm ERR!     errno: -13,

npm ERR!     code: 'EACCES',

npm ERR!     syscall: 'symlink',

npm ERR!     path: '../lib/node_modules/cnpm/bin/cnpm',

npm ERR!     dest: '/usr/local/bin/cnpm'

npm ERR!   },

npm ERR!   errno: -13,

npm ERR!   code: 'EACCES',

npm ERR!   syscall: 'symlink',

npm ERR!   path: '../lib/node_modules/cnpm/bin/cnpm',

npm ERR!   dest: '/usr/local/bin/cnpm'

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.


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

1回答
好帮手慕久久 2021-10-16 18:29:21

同学你好,建议在安装指令前添加sudo试试,例如:

sudo npm install -g  vorlon

祝学习愉快!

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师