1.安裝失敗
qian@qian-K45VM ~ % npm install bower -g
npm ERR! Linux 4.4.0-79-generic
npm ERR! argv "/home/qian/下載/Appium/node/bin/node" "/home/qian/下載/Appium/node/bin/npm" "install" "bower" "-g"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! failed to fetch from registry: http://registry.cnpmjs.org/bower
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! /home/qian/npm-debug.log
2.看樟氢?懵 npm-debug.log
發(fā)現(xiàn)在請(qǐng)求的時(shí)候出現(xiàn)304,想到自己以前這個(gè)是安裝過的侠鳄,所以請(qǐng)求也沒變過埠啃,所以應(yīng)該是去讀緩存了。不再是重新下載伟恶。
HTTP 304 錯(cuò)誤:Not Modified 客戶端有緩沖的文檔并發(fā)出了一個(gè)條件性的請(qǐng)求(一般是提供If-Modified-Since頭表示客戶只想比指定日期更新的文檔)碴开。服務(wù)器告訴客戶,原來(lái)緩沖的文檔還可以繼續(xù)使用博秫。
3.直接吧lib里面的文件都替換了潦牛。
qian@qian-K45VM ~ % npm install bower -g
npm WARN deprecated bower@1.8.0: ..psst! While Bower is maintained, we recommend Yarn and Webpack for *new* front-end projects! Yarn's advantage is security and reliability, and Webpack's is support for both CommonJS and AMD projects. Currently there's no migration path but we hope you'll help us figure out one.
/home/qian/下載/Appium/node/bin/bower -> /home/qian/下載/Appium/node/lib/node_modules/bower/bin/bower
/home/qian/下載/Appium/node/lib
└── bower@1.8.0
...結(jié)果成功的下載了個(gè)棄用的項(xiàng)目,我也是醉了挡育。