gpt4 book ai didi

security - bower 安装 self_signed_cert_in_chain

转载 作者:太空宇宙 更新时间:2023-11-03 12:37:40 26 4
gpt4 key购买 nike

我正在使用 git bash 在 Windows 中构建一个角度应用程序,到目前为止,我已经能够使用 yo 搭建脚手架,没有问题,但是当我尝试发出以下命令时。有人可以指点我解决这个问题。

bower 安装角度引导

我收到以下错误:

bower error         Request to https://bower.herokuapp.com/packages/angular-reso
urce failed: SELF_SIGNED_CERT_IN_CHAIN

Stack trace:
Error: Request to https://bower.herokuapp.com/packages/angular-resource failed:
SELF_SIGNED_CERT_IN_CHAIN
at createError (c:\Users\arusarka\AppData\Roaming\npm\node_modules\bower\nod
e_modules\bower-registry-client\lib\util\createError.js:2:15)
at Request._callback (c:\Users\arusarka\AppData\Roaming\npm\node_modules\bow
er\node_modules\bower-registry-client\lib\lookup.js:97:29)
at self.callback (c:\Users\arusarka\AppData\Roaming\npm\node_modules\bower\n
ode_modules\request\request.js:129:22)
at Request.EventEmitter.emit (events.js:95:17)
at Request.request.emit (c:\Users\arusarka\AppData\Roaming\npm\node_modules\
bower\node_modules\bower-registry-client\node_modules\request-replay\index.js:69
:33)
at ClientRequest.self.clientErrorHandler (c:\Users\arusarka\AppData\Roaming\
npm\node_modules\bower\node_modules\request\request.js:239:10)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at CleartextStream.socketErrorListener (http.js:1528:9)
at CleartextStream.EventEmitter.emit (events.js:95:17)
at SecurePair.<anonymous> (tls.js:1368:19)

最佳答案

它终于对我有用了。这些是我采取的步骤:

  1. 从 npm npm uninstall bowernpm uninstall -g bower 卸载 bower
  2. 从 npm npm install bower-canarynpm install -g bower-canary 安装 bower-canary
  3. 在您的项目目录中使用以下内容创建 .bowerrc 以关闭 SSL:
{ "strict-ssl": false,  "https-proxy": "" }
  1. 然后重试 bower install angular-bootstrap

关于security - bower 安装 self_signed_cert_in_chain,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19143738/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com