node.js - 安装 npm 包时的 UNABLE_TO_VERIFY_LEAF_SIGNATURE
问题描述
我几天前更新了npm。尝试安装 parcel-bundler 时出现以下错误。
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning UNABLE_TO_VERIFY_LEAF_SIGNATURE: request to https://registry.npmjs.org/parcel-bundler failed, reason: unable to verify the first certificate
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! request to https://registry.npmjs.org/js-yaml failed, reason: unable to verify the first certificate
我尝试将 strict-ssl 设置为 false 。我收到以下错误。
npm ERR! code E403
npm ERR! 403 403 npmjsorgcoachpage - GET https://registry.npmjs.org/parcel-bundler
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.
npm version 6.13.4
node version v12.14.1
解决方案
推荐阅读
- javascript - 如何使用 JavaScript 将类应用于特定页面上的所有链接?
- rust - 无法在其他文件 rust 中使用已实现的特征
- electron - 电子的 registerHttpProtocol 在开发中工作吗?
- splunk-query - splunk 示例查询以在未找到数据时发出警报
- sql - 我在这个 SQL 请求中遗漏了什么?
- splunk - Splunk HTTP 事件收集器 - 为什么我的时间字段有 000 毫秒?
- reactjs - AmplifyAuthenticator 与 react-router-dom
- delay - Modelica 中延迟算子中的缓冲存储器
- firebase - 避免将功能部署到生产环境
- python - 在 txt 文件中搜索字符串