npm下载包时,报错It is likely you do not have the permissions to access this file as the current user没有权限解决

在用npm install下载包时报错

npm下载包时,报错It is likely you do not have the permissions to access this file as the current user没有权限解决

解决方法:

第一步:在控制台输入

ls -al查看权限

npm下载包时,报错It is likely you do not have the permissions to access this file as the current user没有权限解决

当前不具备node_moduls的写权限

更改写入权限

在控制台输入  sudo chown -R gx node_modules

之后即可npm i去下载包了