简体   繁体   English

错误“由于 npm ERR 中的错​​误,您的缓存文件夹包含根拥有的文件!之前版本的 npm 已得到解决”

[英]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.

相关问题 npm 安装总是给出“您的缓存文件夹包含根拥有的文件,由于 npm 以前版本的 npm 中的错误,该错误已得到解决。” - npm install always gives 'Your cache folder contains root-owned files, due to a bug in npm previous versions of npm which has since been addressed.' 错误“您的缓存文件夹包含根拥有的文件,由于以前版本的 npm 中的错误”而“npx create-react-app example_app” - Error "Your cache folder contains root-owned files, due to a bug in previous versions of npm" while "npx create-react-app example_app" Jenkins 构建问题 - npm 错误! 您的缓存文件夹包含 root 拥有的文件 - Jenkins build issue - npm ERR! Your cache folder contains root-owned files 您的缓存文件夹包含根拥有的文件 - Your cache folder contains root-owned files npm 安装错误并且无法更改 root 拥有的文件的所有权 - npm install error and unable to change ownership of root owned files npm 错误! 此 package 已标记为私有 - npm ERR! This package has been marked as private npm 错误! 没有可用于电报键盘的版本 - npm ERR! No versions available for telegraf-keyboard npm 错误。 cb() 从未调用:npm ERR! 这是 npm 本身的错误。 请报告此错误:npm ERR - npm ERR! cb() never called! npm ERR! This is an error with npm itself. Please report this error at: npm ERR 哪些版本的 npm 附带哪些版本的 node? - Which versions of npm came with which versions of node? `yo angular` 给出错误:npm ERR。 代码 ENOENT npm 错误! errno 34(是的,我已经清理了缓存并设置了 .npmignore) - `yo angular` gives error: npm ERR! code ENOENT npm ERR! errno 34 (yes I have cleaned the cache and set .npmignore)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM