how do I install a previous version of meteor JS?

假如想象 提交于 2020-01-09 13:10:23

问题


I'm trying to host a meteor app that uses an old version of meteor. Every time i try to start the app it will get somewhat through the process of installing the tool, and then i see a message such as:

Killednloading meteor-tool@1.1.3...          -                                     

(note how killed somehow overwrites the downloading part of the command line)

Is there a reliable way to install the meteor tool at a specific version?


回答1:


EDIT:

The Meteor team added a release parameter to their download endpoint. Now you can simply specify the desired version:

curl "https://install.meteor.com/?release=1.3.3.1" | sh

For Windows, a version parameter exists for the choco installer:

choco install meteor --version 1.3.3.1

Original solution

You can use sed for that. Insert it in the middle of curl and sh:

curl https://install.meteor.com/ | sed 's/1.4/1.3.3.1/' | sh

That will replace the release 1.4 (current version) to 1.3.3.1




回答2:


When you create a meteor app you can specify a release:

meteor create test --release x.y.z

And when you update a meteor app you can do the same:

meteor update --release x.y.z



回答3:


@Jorge Issa's answer is good if you are installing Meteor from scratch, on a system that never had Meteor installed, however it's subject to change since versions change all the time, so you need to adapt the sed line.

If you have any version of Meteor already installed, as Michel Floyd mentioned, you can always create a project with a specific version by adding the --release flag.

meteor update --release xxxx works fine with you're actually upgrading, but downgrading is a different story.

My recommendation when it comes to upgrading and eventually downgrading, is to use version control (git).

Attempt upgrade and if all is fine, you're in good shape, if not and you want to downgrade, simply clear the file changes in your version control system and use meteor reset to clean your project and rebuild with the previous version.

!Note! meteor reset clears the local mongo database too, so be sure to back that up first if you're going to do that (check mongodump and mongorestore for that)

finally, if you're looking to clean up the clutter from the .meteor folder, you can delete the folder and then run meteor reset in your project: the meteor executable will detect you don't have the needed packages will re-download the packages for the version needed by your project. (This takes a while and if you have many project, can be cumbersome as you need to do this in each project, but if like me you are looking to clear some space, this works fine.)




回答4:


Try:

meteor update --release x.y.z



回答5:


Try

choco install meteor --x86 --params="'/RELEASE:1.5.4.4'"


来源:https://stackoverflow.com/questions/36609525/how-do-i-install-a-previous-version-of-meteor-js

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!