Paul
Paul

Reputation: 36319

Node.js version and Heroku

So, I got a small site started in node.js (my first one) using Express. Pretty happy with it, until I tried to deploy to Heroku and found that I had 0.4.9 installed and they only support 0.4.7.

Is uninstalling 0.4.9 and installing 0.4.7 my only option, or is there a way to do a side-by-side on the two?

Upvotes: 2

Views: 1369

Answers (3)

Aaron Qian
Aaron Qian

Reputation: 4485

It seems Heroku only supports 0.4.7 at the moment and even suggests to develop strictly on that version.

If you have to use heroku then you have to uninstall 0.4.9, install 0.4.7.

If you don't have to use heroku. You can always setup a VPS yourself, and you will have the freedom to install whatever version that pleases you. :D

Upvotes: 1

James Ward
James Ward

Reputation: 29433

You can override the version of node.js and npm by customizing the Heroku build pack:
http://blog.superpat.com/2011/11/15/running-your-own-node-js-version-on-heroku/

Upvotes: 3

mehtryx
mehtryx

Reputation: 21

Actually...you do not have to remove anything.

Just ensure you are using features of node compliant with node 0.4.7 and when you make your package.json which specifies your dependencies has the correct version number or range specified.

I had a similar issue where one of our developers made is packacge and set the dependency to node 0.4.8 however it didn't require this it was just what version he was using at the time, we ended up updating his package.json to list node 0.4.7 instead and then my package which depended on his deployed to heroku just fine.

Upvotes: 2

Related Questions