Need to re-deploy an old Meteor 0.7 app, and nothing works!

Hey guys. I am kicking myself for some trouble with deploying an old Meteor app with some small changes. Specifically, I built this app in 2014 on Meteor 0.7.1.2, with a bunch of mrt packages, and I had been deploying it manually with a script based on the instructions from here: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-meteor-js-application-on-ubuntu-14-04-with-nginx. My nginx and meteor are just running on a Linode ubuntu server, but I’m using MongoDB hosted by mlab.com.

I’m working on a rewrite of the app, as it uses Blaze and Bootstrap, and I’d like it to use React and mess with some other CSS. But I had a customer request for some changes, so I have been patching the legacy app too. Up until a few weeks ago, I could re-run my old homemade deploy script just fine.

A few days ago though, confident I could put the app right back up, I took it down and went to redeploy from a branch… and I started getting errors around bcrypt and node-gyp. I can’t remember the exact errors… my environment has been torn apart since then. But it’s all tracked in git, so I might go back and try my original deploy script again and see what the specific problem was after I post this. Meanwhile, the app is down. I threw a static “sorry, down for maintenance” page on the domain, and for the last few days I’ve been just trying to do anything I can to get my old app back online.

I decided to throw out the custom deploy script, and get a brand new Ubuntu 16.04 server instance running to try and deploy this thing with mup. I have had a lot of success with mup on Meteor 1+, and so I thought I would try and use it for the Meteor 0.7 monstrosity. Well… it seems like it almost works, but I get weird errors. I got something about node versions at one point, so I tried a few of the different docker images for mup, and with one of them i was getting something about needing to reinstall fibers. I have also tried both mupx and mup-legacy (as published on npm under those names) with various settings, with no luck and some similar errors.

One particularly laughable part of this problem is, somewhere between Meteor 0.7 and today, the “meteor bundle” command was removed and replaced with “meteor build”. And meteor is smart enough to run the older command line tools that came with the Meteor release I’m trying to use… but mup doesn’t know about the command changing… so I run “mup deploy” and I get “meteor build is not a command.” SMH. I worked around that by just doing “meteor bundle ~/tmp/bundle.tar.gz” and then “mup deploy --cached-build” with buildLocation set to ~/tmp in my mup configuration. But I still get errors from inside the docker image about problems with the Node environment.

In a desperate attempt to just leave Meteor 0.7 behind and deploy a version of my Blaze app with the latest Meteor, I started embarking on the journey of updating it to the latest Meteor release and using mup… but it’s using a grab bag of old meteorite packages and I really don’t know if I have time to finish that endeavor, and in that branch I’m still getting errors about using Handlebars wrong.

Can anyone help me just get this damn bundle on the internet? The app runs fine locally on Meteor 0.7. What am I doing wrong?

The biggest problem I have with my one Blazed based project is that the packages are no longer well maintained. I’ve had to in a bunch of cases, fork the packages to update dependencies, and get everything working. I even have had to clone and shim some packages (like the older aldeed:autoform and simple schema) so that some outdated packages wouldn’t pull in a second copy. It’s for these reasons I wouldn’t recommend Blaze today - but maybe that can also provide a hint on how to move your project forward?

I have again had trouble just updating from 1.6.x to whatever the current 1.6.x patch is - even that didn’t go smoothly, so I just left it unpatched.

Good luck.

Thanks. Yeah, I have been working on separate and much more modern Meteor apps in React and it’s going great. I will rewrite this thing in React soon. I just need to get the old version back online asap.

Also @captainn, my app runs fine locally, the package maintenance issues are things I have smoothed over myself over time. My app bundles just fine. My question is how to deploy a Meteor 0.7 bundle today— i may have to go back to my custom deploy script.

1 Like

Without knowing the details/specific errors I’m afraid it’s rather difficult for people to help in a meaningful way here. Having said that, since time is of the essence, in your position I would probably try to recreate the last working setup you had prior to the failed deploy with your old deployment script instead of introducing new variables in the form of mup. But prior to that, perhaps spin up a quick container in Galaxy? Not sure if Galaxy plays nice with such an old version of Meteor, but it requires very little effort and, more importantly, very little time to give it a shot. Especially since you have your DB already at mlab.

Thanks @vooteles I appreciate that. I might try Galaxy, although I suspect it’ll give me the same node environment problems I am getting trying to use modern meteor-up tools on a fresh ubuntu server.

I got carried away trying to work on the rewrite, and at this rate I might just wait and leave the app down until I can launch the 2.0 version. But it would be nice to put 1.0 back online too, so I’ll get you guys my specific errors when I have a chance.

Yeah sounds like you’ll have to do a time-consuming manual deploy for this one

Maybe it would be less difficult to upgrad to like Meteor 1.1, and the deploy that?

@captainn that’s what I had started trying before I posted this, but I had given up due to cryptic errors. I just got back in there and figured it out, and now I have my legacy app on the latest Meteor and it works great.

Cheers, thanks guys. To anyone else who finds this on google, the answer to how to deploy Meteor 0.7 in 2018: Don’t.

2 Likes