简体   繁体   English

运行 npm 安装时,我正在返回 npm 错误! 代码 E404

[英]when running npm install I am getting back npm ERR! code E404

I am trying to run npm install and am getting Error 404 everytime.我正在尝试运行 npm 安装并且每次都收到错误 404。 The node_modules file will show up while trying to install and then get taken away when the error comes up. node_modules 文件将在尝试安装时出现,然后在出现错误时被删除。

npm install
npm ERR! code E404
npm ERR! 404 Not Found - GET https://repositor.com/artifactory/api/npm/ui-mjd/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz
npm ERR! 404
npm ERR! 404  'whatwg-fetch@https://repository.com/artifactory/api/npm/ui-mjd/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

Things that I have tried:我尝试过的事情:

  • npm cache clean npm 缓存清理
  • npm rebuild npm 重建
  • updating the registry更新注册表
  • repulling down the past working file from github从 github 中删除过去的工作文件

Other people are accessign the same code from github and it is working fine, but I am unable to run it through npm.其他人正在从 github 访问相同的代码,它工作正常,但我无法通过 npm 运行它。 Any thoughts?有什么想法吗?

I was able to solve it by running commands我能够通过运行命令来解决它

npm update --force
npm audit fix --force

I was also having the same problem.我也有同样的问题。 The name of the file at which I was working on was something like random.file我正在处理的文件的名称类似于 random.file

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM