当运行npm install时,我会得到npm ERR!代码E404。

3

我正在尝试运行npm install,但每次都会出现404错误。在尝试安装时,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.

我尝试过的事情:

  • 清除npm缓存
  • npm重建
  • 更新注册表
  • 从GitHub重新拉取过去有效的文件

其他人从GitHub访问相同的代码,运行良好,但我无法通过npm运行它。有什么想法吗?

1个回答

1

我通过运行命令解决了它。

npm update --force
npm audit fix --force

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接