npm install 失败,'error-ex@^1.3.1' 不在 npm 注册表中 [英] npm install fails with 'error-ex@^1.3.1' is not in the npm registry

查看:488
本文介绍了npm install 失败,'error-ex@^1.3.1' 不在 npm 注册表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

npm install 失败并出现以下错误:

npm install fails with the following error:

⠼ Installing packages...npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/error-ex
npm ERR! 404 
npm ERR! 404  'error-ex@^1.3.1' 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 It was specified as a dependency of 'parse-json'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

推荐答案

好吧,我不知道如何添加此附加信息,因为由于没有 50 声望和我对此问题的编辑,我无法发表评论详细信息被社区拒绝并带有消息

Well I don't know how to add this additional info, since I can't comment due to not having 50 reputation and my edit to the question with this details was rejected by the community with the message

此编辑旨在针对帖子的作者,作为编辑没有任何意义.它应该写成评论或答案.

This edit was intended to address the author of the post and makes no sense as an edit. It should have been written as a comment or an answer.

访问 https://registry.npmjs.org/error-ex &https://registry.npmjs.com/error-ex 提供了一个 cloudflare 404 错误页面.

Visting https://registry.npmjs.org/error-ex & https://registry.npmjs.com/error-ex gives a cloudflare 404 error page.

访问位于 https://skimdb.npmjs.com/error-ex 给出了 json 响应,但由于 tarball 链接来自 https://registry.npmjs.org/将注册表设置为镜像后 npm install 失败,url https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz

Visiting the npm registry mirror at https://skimdb.npmjs.com/error-ex gives a json response but since the tarball links are from https://registry.npmjs.org/ npm install after setting the registry to the mirror fails with a cloudflare 404 for the url https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz

尝试了几个互联网连接,因为问题似乎与 cloudflare 有关.当通过浏览器和 wget 尝试时,我尝试的其中一个互联网连接给了我正确的 json 响应.但仍然 npm install 失败.

Tried with a couple of internet connections since the problem seems to be something with cloudflare. One of the internet connections I tried gave me the proper json response when tried via browser and wget. But still npm install failed.

最终通过使用互联网连接手动下载上述 tarball 使其工作,这给了我正确的结果,然后通过

Finally got it working by manually downloading the above tarball with the internet connection that gave me the proper result and then adding it to the npm cache by

npm 缓存添加

注意:虽然这解决了这个特定问题.还有其他包有同样的问题.所以,最后我安装了 npm_lazy(http://mixu.net/npm_lazy/) 用作我的存储库.通过编辑 json 文件手动将 error-ex 之类的失败项添加到 npm_lazy 缓存.

Note: Though this fixed this specific issue. There were other packages with the same issue. So, finally I ended up installing npm_lazy(http://mixu.net/npm_lazy/) to use as my repository. Manually added the failing item like error-ex to the npm_lazy cache by editing the json file.

这篇关于npm install 失败,'error-ex@^1.3.1' 不在 npm 注册表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆