我正在尝试在运行mojave 10.14.6的Mac上全局安装ESlint,但是每次我运行'npm install -g eslint'时,都会出现此错误:
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 (though this is not recommended).
反正有运行具有root / admin权限的终端吗?
答案 0 :(得分:0)
您是否尝试过sudo npm install -g eslint
并输入密码?