2017-03-18 152 views
0

我正在嘗試學習node和npm和gulp以及所有但都遇到這個錯誤。npm install --save-dev gulp:SELF_SIGNED_CERT_IN_CHAIN

$ npm install --save-dev gulp 
npm ERR! Windows_NT 6.3.9600 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save-dev" "gulp" 
npm ERR! node v6.10.0 
npm ERR! npm v3.10.10 
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN 

npm ERR! self signed certificate in certificate chain 
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 support request: 
npm ERR!  C:\Users\davidb\desktop\testproject\npm-debug.log 

有誰知道如何解決這個問題?我正在使用gitbash而不是節點,因爲在我的節點中,我甚至不能執行node-v,我必須使用process.version才能獲得版本。和幫助,將不勝感激!我一直在使用http://blog.npmjs.org/post/78165272245/more-help-with-selfsignedcertinchain-and-npm來嘗試解決這個問題,但沒有任何工作。

也試過:

npm config set ca "" 

and 

npm install npm -g --ca="" 

無論是工作,我仍然得到錯誤NPM ERR!代碼SELF_SIGNED_CERT_IN_CHAIN

回答