No compatible version with swagger@'latest' #2859

Closed
slim2000 opened this Issue Oct 7, 2012 · 2 comments

Projects

None yet

2 participants

@slim2000

I've got Swagger as a dependency in my app. The app builds/run fine locally, as well as on nodejitsu. However, trying to deploy to Heroku and I get the error below. Thanks for any help in understanding if this is a Heroku issue getting access to Swagger files or if I've just got a incompatible swagger / node verions...:

   npm http 200 https://registry.npmjs.org/swagger

   npm ERR! Error: No compatible version found: swagger@'latest'
   npm ERR! No valid targets found.
   npm ERR! Perhaps not compatible with your version of node?
   npm ERR!     at installTargetsError (/tmp/node-npm-whYR/lib/cache.js:488:10)
   npm ERR!     at /tmp/node-npm-whYR/lib/cache.js:375:15
   npm ERR!     at saved (/tmp/node-npm-whYR/lib/utils/npm-registry-client/get.js:150:7)
   npm ERR!     at /tmp/node-npm-whYR/node_modules/graceful-fs/graceful-fs.js:231:7
   npm ERR!     at Object.oncomplete (fs.js:297:15)
   npm ERR! 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! 
   npm ERR! System Linux 2.6.32-347-ec2
   npm ERR! command "/tmp/node-node-4jZj/bin/node" "/tmp/node-npm-whYR/cli.js" "install" "--production"
   npm ERR! cwd /tmp/build_22r0fi4i4oeni
   npm ERR! node -v v0.8.6
   npm ERR! npm -v 1.1.9
   npm ERR! message No compatible version found: swagger@'latest'
   npm ERR! message No valid targets found.
   npm ERR! message Perhaps not compatible with your version of node?
   npm ERR! 
   npm ERR! Additional logging details can be found in:
   npm ERR!     /tmp/build_22r0fi4i4oeni/npm-debug.log
   npm not ok

! Failed to install --production dependencies with npm
! Heroku push rejected, failed to compile Node.js app

@mfncooper
npm member

Swagger is not compatible with Node.js v0.8.x:

$ npm info swagger engines
{ node: '~0.6.6' }

The log you included above shows you're using Node.js v0.8.6. Since you're also using a very old version of npm (v1.1.9 in the above log, while v1.1.62 is the latest), this is an error. Newer versions of npm will issue a warning rather than an error (but can't guarantee that Swagger will actually work with Node v0.8, of course).

@mfncooper mfncooper closed this Oct 7, 2012
@slim2000

Perfect... going to "npm": "1.1.49" worked for deploying to Heroku. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment