Update Node version for Meteor app hosted on Heroku

I have a few Meteor applications deployed to Heroku which are using 0.10.40 NodeJS version and I want to upgrade this. I received an email from Heroku to upgrade the NodeJS version for my applications to prevent remote Denial of Service (DoS) Constant Hashtable Seeds vulnerability. I have a packages file instead of packages.json in my application’s “.meteor” folder in which packages are listed. I want to update the Node version to 4.8.4, 6.11.1, 7.10.1 or 8.1.4 and these versions have the patch for DoS fix.

If I run the following command on my local machine and it upgrades the node version to 4.8.4.
meteor update --release 1.2.1

But for Heroku, below command returns the error bash: meteor: command not found.
heroku run meteor update --release 1.2.1 -a MyAppName

So how can I upgrade the version for my applications on Heroku?

Any help would be much appreciated. Thanks in advance!

Each version of Meteor comes bundled with a specific version of Node.js. Meteor 1.2.1 (which was originally released with Node 0.10.40 in October of 2015) has not been supported for a very long time and does not include the version of Node.js you’re looking for. If you want a version of Meteor with Node 4.8.4, you’ll need to update to Meteor 1.5.1.

A deployed Meteor application is simply a Node application and the meteor tool itself would not be present. You’ll want to update the application locally to Meteor 1.5.1, and then redeploy to Heroku however that was done originally.

You’ll probably want to review the various migration guides to get up to date with Meteor 1.5.1.

Thank you @abernix. It solved my issue. I updated the Meteor version to 1.5.1 which updated the node version to 4.8.4. I executed the following command in the terminal:
meteor update --release 1.5.1

After committing and pushing code to Heroku, there were a few babel-runtime and bcrypt crashes. I executed the following commands to fix those issues:

meteor npm install --save babel-runtime
meteor npm install --save bcrypt
meteor update iron:middleware-stack

Pushing these updates resolved all the issues.