dcsan
dcsan

Reputation: 12275

how do I install a previous version of meteor JS?

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 [email protected]...          -                                     

(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?

Upvotes: 27

Views: 27976

Answers (5)

Nishnat
Nishnat

Reputation: 1

Try

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

Upvotes: 0

Jorge Issa
Jorge Issa

Reputation: 657

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

Upvotes: 60

Abhinav Bahiya
Abhinav Bahiya

Reputation: 47

Try:

meteor update --release x.y.z

Upvotes: 1

MrE
MrE

Reputation: 20778

@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.)

Upvotes: 2

Michel Floyd
Michel Floyd

Reputation: 20227

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

Upvotes: 28

Related Questions