Update Node version for Meteor app deployed to Her

2019-07-28 18:14发布

问题:

I have a Meteor application deployed to Heroku. To prevent the Denial of Service (DoS) vulnerability, Heroku suggested updating the Node.js version for my application. I want to update the meteor version to 1.2.1 and node version to 4.8.4 on Heroku. I have set the node version in packages.json as well but it was not updated after deployment.

How can I update meteor and node on Heroku? I tried the following command:

heroku run meteor update --release 1.2.1 -a myappname

but it throws the following error:

bash: meteor: command not found

Any help would be much appreciated. Thanks in advance!

回答1:

To update my application's node version to 4.8.4, I updated Meteor version to 1.5.1 on my local machine, fixed the dependencies issues and pushed code to the Heroku application which solved the issue.

I used the following command to update Meteor version to 1.5.1 which updated the node package version to 4.8.4 as well:

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 to Heroku solved my issue.



回答2:

You can use the following command to update Meteor version to 1.5.1 meteor update --release 1.5.1