npm 安装失败,提示 'error-ex@^1.3.1' 不在 npm 注册表中

标签 npm npm-install

npm 安装失败并出现以下错误:

⠼ 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 声誉,并且我对包含此详细信息的问题的编辑被社区拒绝,并显示消息

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 错误页面。

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

尝试了几个互联网连接,因为问题似乎出在 cloudflare 上。当我通过浏览器和 wget 尝试时,我尝试的互联网连接之一给了我正确的 json 响应。但仍然npm install失败的。

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

将其添加到 npm 缓存中

npm cache add <link_to_the_tarball>

注意:尽管这解决了这个特定问题。还有其他软件包也存在同样的问题。所以,最后我最终安装了 npm_lazy ( http://mixu.net/npm_lazy/ ) 用作我的存储库。手动添加失败的项目,如 error-exnpm_lazy通过编辑 json 文件进行缓存。

关于npm 安装失败,提示 'error-ex@^1.3.1' 不在 npm 注册表中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60179822/

相关文章:

angular - 安装 ng 添加 @ng-bootstrap/ng-bootstrap 时出错

node.js - NPM 无法安装类型

node.js - npm install -g 再次下载所有依赖项

node.js - Apache Cordova 在 Yosemite 上安装失败

node.js - 对象 #<Object> 没有方法 'type'

node.js - 找不到模块 : Error can't resolve 'child_process' , 如何修复?

node.js - 无法将任何软件包安装到 NPM 或 BOWER

javascript - 如何在我的 react 项目中使用 package.json 依赖项中的系统变量?

javascript - 无限滚动React组件仅在向下滚动时加载一个新的对象切片,然后停止

node.js - 为什么yarn install 会 check out github 存储库依赖项,而npm install 却不会?