DEV Community

Cover image for The status of Meteor on Windows in 2017
Sammy Israwi
Sammy Israwi

Posted on

The status of Meteor on Windows in 2017

Premise and fall from grace โ˜„๏ธ

If you don't care about backstory, jump to "And then we're here".

If you don't know about Meteor, I suggest you read the official pitch on their website. This article is more about the state of it on Windows today.

Ok so, Meteor for me is how I got into web development for real. I used it heavily in 2015 for my Summer internship at Spiceworks after my mentor recommended it. An easy to use, full stack Javascript framework that blurs the line between Front end and Back end? I was in love!

Sure, it had some performance issues on Windows, but nothing breaking. At the time, I didn't really have to care about deployment since we were dealing with a demo. We could use the free demo hosting MDG provided for Meteor applications.

From the start, Meteor always considered Windows as a side thought, never giving true mobile support for Windows.

I even gave a couple of talks to the local ACM chapter about it! Did a demo deployment and everyone was surprised and they were starting to see why Meteor was great. Meteor was my solve-all solution.

ACM Presentation cover
From my presentation for ACM

Fast forward to one particularly annoying afternoon. A couple of friends asked me to do a short workshop on Meteor to get their feet wet. We could not even get Meteor running on their machines. The installer would work, and it would create the starter project, but the project would not run. After some digging and googling, we found out it was a Windows-specific issue on the current version. Delete everything and start a new project with an older version and no problem.

After that, it was one issue after another. I decided to use it last year for Georgia Tech Hackathon where my friends and I decided to create FlavoredNews: a news client that would sentimentally analyze news and color code them. It was an interesting project, and to my delight Meteor was working flawlessly until we had to deploy. We spent over an hour and a half figuring out how to deploy for free (probably would have been less time if I weren't sleep deprived) and in the end decided to deploy it to MDG's very own Galaxy and eat the cost. Granted, it ended up being only a few dollars at most; but we were expecting to spend a grand total of zero dollars (as we usually do in Hackathons).

Sometimes you just want to bundle and deploy to a platform like Azure and AWS, where you are either in a free tier or have student credits.

I recently was pointed towards this article that gives you a step by step process for deploying Meteor apps to Heroku, we will be trying that out for size today.

After the entire debacle left a sour taste, I dropped Meteor hoping to pick it up in the future when it had better Windows support.

TL;DR: Meteor promises a lot as long as your dev machine is not Windows

And then we're here! ๐Ÿ

We're going to try something really simple today. My goal is to install Meteor create an application, do some minor changes, and deploy to Heroku using this guide mentioned above or something similar.

Important note:
This article was modified from the original publication. A little after making the article public, I attempted a few more things and Meteor worked as intended. Simple stuff like giving the choco installer more time to finish did the trick. Anything after this point is more accurate to what I discovered after publishing.
Sorry for the confusion!

For reference, here is my OS info:

PS C:\Users\Sammy-Surface> systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.15063 N/A Build 15063

Installing ๐Ÿ’ป

Installing seems fairly simple these days:

Install steps

So, run the command on an admin shell and wait for a bit for the download and installation process to finish.

If you are erroring out, there is a good chance the choco installer is timing out. To increase the timeout, run instead:

PS C:\Users\Sammy-Surface> choco install meteor -y --execution-timeout 10000

Keep in mind, this process will take a while.

Starting a project ๐Ÿšฆ

Creating a project is also simple. On a terminal, run:

PS C:\Users\Sammy-Surface\Development> meteor create nothing-app

This may take a while; Meteor is not a lightweight platform.

At this point, there is are a few common errors that will stop your progress. If you get an NPM error during the create process, there is a chance your environment was not reset after installing Meteor. Try to close all command prompts and terminals you have open and reopen it. There are a few other errors that may pop up, hopefully you can find your answer here.

Development ๐Ÿ› ๏ธ

For the development section, we will add support for users in our boilerplate app. For starters, we will add the meteor packages accounts-ui and accounts-password:

PS C:\Users\Sammy-Surface\Development\nothing-app> meteor add accounts-ui accounts-password

Changes to your project's package version selections:

...

accounts-ui: Simple templates to add login widgets to an app
accounts-password: Password support for accounts

We will set up the configuration for the Accounts package on client/main.js. If you have on file only what is relevant, it should look like this:

import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
import { Accounts } from "meteor/accounts-base";

import './main.html';

Accounts.ui.config({
  passwordSignupFields: "USERNAME_ONLY",
});

And somewhere in your main.html, add:

<div class="login">
    {{> loginButtons}}
</div>

Now your website should look like this!

See your first changes on the website

We did not hit any snags! Good for us, proud of Meteor over here. Installing packages easy and it worked.

Deployment ๐Ÿš€

For this section, we will follow this ten step guide mentioned above. This will mean we are deploying to Heroku, therefore you need to set up an account with Heroku and download the Heroku CLI

There are two key points to remember here:

  • We are using a custom buildpack made specifically for Meteor. There are many of these out there, this one is updated and currently maintained.
  • We are using a remote MongoDB instance instead of a local version of it.

And that's it! Go to your Heroku app's website and you will see your application!

Conclusion ๐Ÿ““

It was painful to set up Meteor initially, but once we installed the app we were done for hurdles. Support for Windows is still a side thought, but it is not impossible to be a Windows Meteor Developer. However, I am not a fan of the snags we hit because of our choice of OS. As a developer, the less time I have to spend setting up and bootstrapping a project, the better.

Deployment on Heroku is easy and convenient! Hopefully, the buildpack will be maintained for a while.

I am a fan of these quick build frameworks that allow you to deliver quickly. I will be (cautiously) coming back to Meteor.

Alternatively, if anyone knows frameworks that work similarly to Meteor, I am always looking to explore new ways to build stuff!

While I have your attention, look at the ๐Ÿ‘ฟ entry on EmojiPedia. Anything else that looks... Off?

Oldest comments (7)

Collapse
 
bgadrian profile image
Adrian B.G.

Everything is unnecessarily harder on Windows, from bash to docker and nodejs.

I have an Ubuntu VM where I do the coding after losing entire weeks fighting the inevitable for complex projects.

As for Meteor I have a deployed app on a managed hosting I would recommend only for:

  • fast development (fast iterations, MVP, demos)
  • small / medium projects.

As a context, I worked with nodeJS and custom PHP frameworks, distributed apps etc.

I see Meteor as a development framework, I call it "nodeJS with steroids".
But all the good sides (that helps you to develop fast) will bite your ass when you want to scale (on any level). Like Unity3D you can make a full working website in a matter of hours.

If you plan to develop something larger for a long period of time go with nodeJS directly and install addons (in the end you will have the same functionalities), meteorJS is too proprietary, you depend too much on their team (ex they waited for 2y to update their node version).

Collapse
 
sammyisa profile image
Sammy Israwi

At this point in time, I am hoping to use Meteor only on a few scenarios: prototype development, and hackathons. Problem is that when I need it, I hope it works out of the box.

It is also a nice way to set up a full stack if you are mainly experienced in front end, or don't have a lot of experience in web.

Collapse
 
ben profile image
Ben Halpern

Nice post, the backstory alone was a good read.

Collapse
 
sammyisa profile image
Sammy Israwi

Thank you!

Collapse
 
splitified profile image
Jean-Denis Gallego

If you are on windows 10, the Ubuntu subsystem is another solution to run Meteor (and Mongo) in a Ubuntu environment while using the editors and other tools on Windows without any heavy VM involved.

Collapse
 
foobarbecue profile image
Aaron Curtis

Except that broke in 1.6: github.com/meteor/meteor-feature-r...

Collapse
 
splitified profile image
Jean-Denis Gallego

It actually works quite well in version 1.6.0.1 on my windows laptop right now. capture of my screen here : ibb.co/nbNS4n