Npm安装无法find与carret的版本

我尝试安装软件包,并得到一个错误

npm http 200 https://registry.npmjs.org/broccoli-writer npm ERR! Error: No compatible version found: broccoli-writer@'^0.1.1' npm ERR! Valid install targets: npm ERR! ["0.1.0","0.1.1"] npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:709:10) npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:631:10 npm ERR! at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7) npm ERR! at Object.oncomplete (fs.js:107:15) npm ERR! If you need help, you may report this log at: npm ERR! <http://github.com/isaacs/npm/issues> npm ERR! or email it to: npm ERR! <npm-@googlegroups.com> 

但是,当我发现

^ 1.2.3:=> = 1.2.3 <2.0.0

所以在我的情况下应该使用0.1.1

PS我尝试安装软件包localy,手动更改版本并添加到本地npmcaching。 但是,6包后似乎疯了

PPS在节点0.10.7 / npm 1.2.24上复制问题

更新到npm – 2.5.1后,一切正常

npm@1.2.24已经有几年了,不再受npm团队的支持。 正如你所发现的,解决你的问题只是更新npm 。 这样,你可以有一个npm的版本,它实际上可以理解当看到^ semver操作符时要查找什么。 老版本的npm不知道当他们看到这个操作符时要查找什么,因为操作符比版本更新!