- 查看该文件权限
ls -la /usr/local/lib/node_modules
drwxr-xr-x 3 root wheel 102 Jun 24 23:24 node_modules
-
id -un或whoami确定当前用户 -
sudo chown -R ownerName: /usr/local/lib/node_modules修改文件权限
ls -la /usr/local/lib/node_modules
drwxr-xr-x 3 root wheel 102 Jun 24 23:24 node_modules
id -un 或 whoami 确定当前用户sudo chown -R ownerName: /usr/local/lib/node_modules 修改文件权限