[英]Error "Your cache folder contains root-owned files, due to a bug in npm ERR! previous versions of npm which has since been addressed"
I recently installed Ubuntu 18.04 Stable version.我最近安装了 Ubuntu 18.04 稳定版。 I installed latest stable version of Node.js (v12.16.1) and npm (v6.13.4).我安装了 Node.js (v12.16.1) 和 npm (v6.13.4) 的最新稳定版本。
When i was trying to install "create-react-app" using "npm i create-react-app", I am getting error.当我尝试使用“npm i create-react-app”安装“create-react-app”时,出现错误。
Your cache folder contains root-owned files, due to a bug in previous versions of npm which has since been addressed
I have tried sudo chown -R 1000:1000 "/home/shubham/.npm"
, but still getting same error.我试过sudo chown -R 1000:1000 "/home/shubham/.npm"
,但仍然得到同样的错误。
Request people to help me out.请求人们帮助我。
Thanks in advance !!提前致谢 !!
I ran into this issue and saw this:我遇到了这个问题,看到了这个:
One of my issues was that /npm
did not exist.我的问题之一是/npm
不存在。 I created /npm
and and then ran the suggested command sudo chown -R 1000:1000 "/npm"
and it seemed to work.我创建了/npm
,然后运行了建议的命令sudo chown -R 1000:1000 "/npm"
并且它似乎有效。 I also ran into the same issue with ~/.npm - I believe the difference is that one is global and the other is local.我也遇到了与 ~/.npm 相同的问题 - 我相信区别在于一个是全局的,另一个是本地的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.