Bower无法安装的解决思路

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!     

npm ERR! Please include the following file with any support request:
npm ERR!     /home/qian/npm-debug.log

2.看?懵 npm-debug.log

发现在请求的时候出现304,想到自己以前这个是安装过的,所以请求也没变过,所以应该是去读缓存了。不再是重新下载。

HTTP 304 错误:Not Modified 客户端有缓冲的文档并发出了一个条件性的请求(一般是提供If-Modified-Since头表示客户只想比指定日期更新的文档)。服务器告诉客户,原来缓冲的文档还可以继续使用。

3.直接吧lib里面的文件都替换了。

qian@qian-K45VM ~ %  npm install bower -g
npm WARN deprecated [email protected]: ..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
└── [email protected] 

...结果成功的下载了个弃用的项目,我也是醉了。

你可能感兴趣的:(Bower无法安装的解决思路)