0

I'm trying to deploy a sails.js (node framework) application to openShift. Everything went smooth until I added a new dependencie, the sails-mysql package, who is responsible for connecting node and mysql. I'm getting an error as "Not compatible version found" This is the simplified log...

Error: No compatible version found: sails-mysql@'^0.9.9

Valid install targets:
["0.6.0","0.7.0","0.7.1","0.7.2","0.7.3","0.7.4","0.7.5","0.7.6","0.7.7","0.7.8","0.9.0","0.9.1","0.9.2","0.9.3","0.9.4","0.9.5","0.9.6","0.9.7","0.9.8","0.9.9","0.10.0-rc1","0.10.0-rc2","0.10.0-rc3","0.10.0-rc5"]

at installTargetsError 

node -v v0.10.5

npm -v 1.2.17

For what I understand, node in the openshift server has the 0.10.15 version, which is not one the valid install targets for sails-mysql package... So, han can I the 0.10.5 a valid target for this package? Should I contact the framework developers in order for them to update the package definition or I can fake it someway from my end? I think to lower the node version is not an option, since I'm using the openShift server... Thanks!

maxijb
  • 541
  • 4
  • 13
  • What's that single-quote doing after the `sails-mysql@`? Can you post the relevant part of your `package.json` file? – sgress454 May 04 '14 at 18:55
  • possible duplicate of [Install grunt-phonegap - Error: No compatible version found: URIjs@'^1.12.0'](http://stackoverflow.com/questions/22270244/install-grunt-phonegap-error-no-compatible-version-found-urijs1-12-0) – sgress454 May 05 '14 at 21:54
  • Yes, its the same problem but I wouldn't have to update my npm, but to downgrade my node version, which is basically maintained by openShift, so it's out of my reach. – maxijb May 07 '14 at 15:24
  • 1
    You need at least version 1.3.7 of npm to support the `^` syntax. Your version is 1.2.17. – sgress454 May 07 '14 at 16:00

1 Answers1

1

It's easy:

change "sails-mysql": "^0.9.9" to "sails-mysql": ">=0.9.9" in your package.json

Openshift seem to have a problem whit "^"-indicator.

mdunisch
  • 3,627
  • 5
  • 25
  • 41