安裝react依賴報錯
E:\project\react-music-player>npm install react --save
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\P
node_modules\\npm\\bin\\npm-cli.js" "install" "react" "--s
npm ERR! node v6.11.2
npm ERR! npm ?v3.10.10
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! unable to verify the first certificate
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! ? ? <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any suppor
npm ERR! ? ? E:\project\react-music-player\npm-debug.log
安裝react報這個錯是因為什么呢
2017-09-02
因為npm install走的是https協議,需要通過數字證書來保證的
取消ssl驗證:npm config set strict-ssl false
如果還沒成功,則將npm源更換為國內鏡像:
npm config set registry http://registry.cnpmjs.org/
npm config set registry http://registry.npm.taobao.org/