在这里插入图片描述
查看日志如下:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/node-v10.16.3-linux-x64/bin/node',
1 verbose cli   '/usr/local/node-v10.16.3-linux-x64/bin/npm',
1 verbose cli   'install' ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose npm-session a05fa57cd2f64243
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall elasticsearch-head@0.0.0
7 info lifecycle elasticsearch-head@0.0.0~preinstall: elasticsearch-head@0.0.0
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 timing stage:loadCurrentTree Completed in 9ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
14 silly install loadShrinkwrap
15 timing stage:loadIdealTree:loadShrinkwrap Completed in 3ms
16 silly install loadAllDepsIntoIdealTree
17 silly fetchPackageMetaData error for grunt-contrib-concat@1.0.1 request to https://registry.npm.taobao.org/grunt-contrib-concat failed, reason: unable to verify the first certificate
18 silly fetchPackageMetaData error for grunt-contrib-connect@1.0.2 request to https://registry.npm.taobao.org/grunt-contrib-connect failed, reason: unable to verify the first certificate
19 silly fetchPackageMetaData error for grunt-contrib-watch@1.0.0 request to https://registry.npm.taobao.org/grunt-contrib-watch failed, reason: unable to verify the first certificate
20 silly fetchPackageMetaData error for grunt-contrib-copy@1.0.0 request to https://registry.npm.taobao.org/grunt-contrib-copy failed, reason: unable to verify the first certificate
21 silly fetchPackageMetaData error for grunt-contrib-jasmine@1.0.3 request to https://registry.npm.taobao.org/grunt-contrib-jasmine failed, reason: unable to verify the first certificate
22 silly fetchPackageMetaData error for karma@1.3.0 request to https://registry.npm.taobao.org/karma failed, reason: unable to verify the first certificate
23 silly fetchPackageMetaData error for grunt@1.0.1 request to https://registry.npm.taobao.org/grunt failed, reason: unable to verify the first certificate
24 silly fetchPackageMetaData error for grunt-karma@2.0.0 request to https://registry.npm.taobao.org/grunt-karma failed, reason: unable to verify the first certificate
25 silly fetchPackageMetaData error for grunt-contrib-clean@1.0.0 request to https://registry.npm.taobao.org/grunt-contrib-clean failed, reason: unable to verify the first certificate
26 silly fetchPackageMetaData error for http-proxy@1.16.x request to https://registry.npm.taobao.org/http-proxy failed, reason: unable to verify the first certificate
27 silly fetchPackageMetaData error for grunt-contrib-watch@1.0.0 request to https://registry.npm.taobao.org/grunt-contrib-watch failed, reason: unable to verify the first certificate
28 silly fetchPackageMetaData error for grunt@1.0.1 request to https://registry.npm.taobao.org/grunt failed, reason: unable to verify the first certificate
29 silly fetchPackageMetaData error for grunt-contrib-connect@1.0.2 request to https://registry.npm.taobao.org/grunt-contrib-connect failed, reason: unable to verify the first certificate
30 silly fetchPackageMetaData error for grunt-contrib-concat@1.0.1 request to https://registry.npm.taobao.org/grunt-contrib-concat failed, reason: unable to verify the first certificate
31 silly fetchPackageMetaData error for grunt-contrib-copy@1.0.0 request to https://registry.npm.taobao.org/grunt-contrib-copy failed, reason: unable to verify the first certificate
32 silly fetchPackageMetaData error for grunt-contrib-clean@1.0.0 request to https://registry.npm.taobao.org/grunt-contrib-clean failed, reason: unable to verify the first certificate
33 silly fetchPackageMetaData error for grunt-contrib-jasmine@1.0.3 request to https://registry.npm.taobao.org/grunt-contrib-jasmine failed, reason: unable to verify the first certificate
34 silly fetchPackageMetaData error for http-proxy@1.16.x request to https://registry.npm.taobao.org/http-proxy failed, reason: unable to verify the first certificate
35 silly fetchPackageMetaData error for grunt-karma@2.0.0 request to https://registry.npm.taobao.org/grunt-karma failed, reason: unable to verify the first certificate
36 silly fetchPackageMetaData error for karma@1.3.0 request to https://registry.npm.taobao.org/karma failed, reason: unable to verify the first certificate
37 timing stage:rollbackFailedOptional Completed in 0ms
38 timing stage:runTopLevelLifecycles Completed in 302ms
39 silly saveTree elasticsearch-head@0.0.0
40 verbose type system
41 verbose stack FetchError: request to https://registry.npm.taobao.org/grunt-contrib-watch failed, reason: unable to verify the first certificate
41 verbose stack     at ClientRequest.req.on.err (/usr/local/node-v10.16.3-linux-x64/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)
41 verbose stack     at ClientRequest.emit (events.js:198:13)
41 verbose stack     at TLSSocket.socketErrorListener (_http_client.js:392:9)
41 verbose stack     at TLSSocket.emit (events.js:198:13)
41 verbose stack     at emitErrorNT (internal/streams/destroy.js:91:8)
41 verbose stack     at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
41 verbose stack     at process._tickCallback (internal/process/next_tick.js:63:19)
42 verbose cwd /usr/local/elasticsearch-head-master
43 verbose Linux 3.10.0-514.el7.x86_64
44 verbose argv "/usr/local/node-v10.16.3-linux-x64/bin/node" "/usr/local/node-v10.16.3-linux-x64/bin/npm" "install"
45 verbose node v10.16.3
46 verbose npm  v6.9.0
47 error code UNABLE_TO_VERIFY_LEAF_SIGNATURE
48 error errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
49 error request to https://registry.npm.taobao.org/grunt-contrib-watch failed, reason: unable to verify the first certificate
50 verbose exit [ 1, true ]

因为刚学习使用es,为了解决这个错误来来回回安装了三个多小时~~~
最后抱着试试的态度在度娘上面搜了一下这个问题:error code UNABLE_TO_VERIFY_LEAF_SIGNATURE 在linux任意路径下输入:
在这里插入图片描述

npm config set strict-ssl false

结果,还成功了,只想说一句mmp~~~
总结:可能是网络或者是防火墙问题造成的

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐