npm can't install dependencie (sails-mysql) on openshift because no compatible target found

StackOverflow https://stackoverflow.com/questions/23450943

  •  15-07-2023
  •  | 
  •  

Question

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!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top