Skip to main content

近期学习 vue
刚刚上手,npm install 命令时候就遭遇了:

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

查阅资料后,借助YouTube这个视频解决了问题:

命令1:
ls -l
查看各个文件属性,其实报错中可以看到是哪个文件权限不对

命令2:
whoami
查看一下自己目前账号

命令3:
sudu chown USER_NAME FILENAME.TYPE
以此把这个文件的所有权抓到自己手里

问题解决。

Leave a Reply