npm install - Error: No compatible version found: cherrio@'^0.17.0' - manual install then loop of package install

时间:2016-07-11 23:19:44

标签: node.js npm npm-install nvm

I'm trying to get into a legacy program, which doesn't have any other developers remaining that worked on it over a year ago.

The readme says to install via npm install. When I ran that, it complained about the version of node and suggested node 0.8.x. Based on that I used nvm install 0.8.9 then did nvm use 0.8.9.

When I run npm install, I now get:

npm ERR! Error: No compatible version found: cheerio@'^0.17.0'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.0.2","0.0.3","0.0.4","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.2.0","0.2.1","0.2.2","0.3.0","0.3.1","0.3.2","0.4.0","0.4.1","0.4.2","0.5.0","0.5.1","0.5.2","0.6.0","0.6.1","0.6.2","0.7.0","0.8.0","0.8.1","0.8.2","0.8.3","0.9.0","0.9.1","0.9.2","0.10.0","0.10.1","0.10.2","0.10.3","0.10.4","0.10.5","0.10.6","0.10.7","0.10.8","0.11.0","0.12.0","0.12.1","0.12.2","0.12.3","0.12.4","0.13.0","0.13.1","0.14.0","0.15.0","0.16.0","0.17.0","0.18.0","0.19.0","0.20.0"]
npm ERR!     at installTargetsError (~/.nvm/v0.8.9/lib/node_modules/npm/lib/cache.js:553:10)
npm ERR!     at ~/.nvm/v0.8.9/lib/node_modules/npm/lib/cache.js:477:15
npm ERR!     at saved (~/.nvm/v0.8.9/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7)
npm ERR!     at ~/.nvm/v0.8.9/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:220:7
npm ERR!     at Object.oncomplete (fs.js:297: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>

npm ERR! System Darwin 14.5.0
npm ERR! command "~/.nvm/v0.8.9/bin/node" "~/.nvm/v0.8.9/bin/npm" "install"
npm ERR! cwd ~/workspace/path/to/project
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.1.61

What bothers me is the fact that it references ^0.17.0 and from reading, it sounds like that should support any 0.x.y version that is 0.17.0 or greater. Since 0.17.0, 0.18.0, 0.19.0 and 0.20.0 are in the list, I would assume that things should be just peachy.

If I do node install cheerio@0.17.0 then it seems to work, I then do another npm install and get a new package error like the above, I then manually do the version and it seems to loop back to the cheerio package.

Thoughts on what I'm missing?

1 个答案:

答案 0 :(得分:0)

你得到了&#39; ^ 0.17.0&#39;来自json?要在cmd中工作,只需删除撇号

npm install cheerio@^0.17.0