安装Bower时,我遇到以下错误: -
Stack trace:
Error: Request to https://bower.herokuapp.com/packages/es5-shim failed: SELF_SIG
NED_CERT_IN_CHAIN
at createError (C:\Users\Rishabh.Shukla\AppData\Roaming\npm\node_modules\bow
er\node_modules\bower-registry-client\lib\util\createError.js:2:15)
at Request._callback (C:\Users\Rishabh.Shukla\AppData\Roaming\npm\node_modul
es\bower\node_modules\bower-registry-client\lib\lookup.js:98:29)
at self.callback (C:\Users\Rishabh.Shukla\AppData\Roaming\npm\node_modules\b
ower\node_modules\bower-registry-client\node_modules\request\request.js:129:22)
at Request.EventEmitter.emit (events.js:95:17)
at Request.request.emit (C:\Users\Rishabh.Shukla\AppData\Roaming\npm\node_mo
dules\bower\node_modules\bower-registry-client\node_modules\request-replay\index
.js:69:33)
at ClientRequest.self.clientErrorHandler (C:\Users\Rishabh.Shukla\AppData\Ro
aming\npm\node_modules\bower\node_modules\bower-registry-client\node_modules\req
uest\request.js:239:10)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at CleartextStream.socketErrorListener (http.js:1547:9)
at CleartextStream.EventEmitter.emit (events.js:95:17)
at SecurePair.<anonymous> (tls.js:1389:19)
Console trace:
Trace
at StandardRenderer.error (C:\Users\Rishabh.Shukla\AppData\Roaming\npm\node_
modules\bower\lib\renderers\StandardRenderer.js:74:17)
at Logger.<anonymous> (C:\Users\Rishabh.Shukla\AppData\Roaming\npm\node_modu
les\bower\bin\bower:114:22)
at Logger.EventEmitter.emit (events.js:95:17)
at Logger.emit (C:\Users\Rishabh.Shukla\AppData\Roaming\npm\node_modules\bow
er\node_modules\bower-logger\lib\Logger.js:29:39)
at C:\Users\Rishabh.Shukla\AppData\Roaming\npm\node_modules\bower\lib\comman
ds\install.js:35:16
at _rejected (C:\Users\Rishabh.Shukla\AppData\Roaming\npm\node_modules\bower
\node_modules\q\q.js:797:24)
at C:\Users\Rishabh.Shukla\AppData\Roaming\npm\node_modules\bower\node_modul
es\q\q.js:823:30
at Promise.when (C:\Users\Rishabh.Shukla\AppData\Roaming\npm\node_modules\bo
wer\node_modules\q\q.js:1035:31)
at Promise.promise.promiseDispatch (C:\Users\Rishabh.Shukla\AppData\Roaming\
npm\node_modules\bower\node_modules\q\q.js:741:41)
at C:\Users\Rishabh.Shukla\AppData\Roaming\npm\node_modules\bower\node_modul
es\q\q.js:557:44
System info:
Bower version: 1.3.1
Node version: 0.10.26
OS: Windows_NT 6.2.9200 x64
知道如何解决这个问题吗?为什么我得到这个错误?
答案 0 :(得分:0)
今天Bower的当前版本是1.3.8
每次我尝试在Windows 7上使用npm install bower
命令进行安装,但总是失败。
在搜索错误信息后,我在GitHub上发现了一个问题,描述了Bower安装上的一个错误,建议使用npm install -g bower@1.2.6
我尝试安装1.2.6并且工作了。
但我不喜欢使用过时的版本,然后我卸载了1.2.6版本,并尝试再次安装最新版本,这次工作。
要恢复:
1 - 尝试使用npm install -g bower@1.2.6
安装1.2.6版本
2 - 使用'npm uninstall -g bower'卸载Bower
3 - 尝试使用npm install -g bower
我希望它有所帮助