ESlint 全局安装 mac 根终端错误



我试图在运行 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/管理员权限运行终端吗?

您是否尝试过sudo npm install -g eslint并输入密码?

最新更新