Adding meteor package in Windows

I have been playing with Meteor on my mac after initial hiccups in Windows. Now I got a hang on it, I thought I give it a try again in Windows and turned out, it is was not that hard.

You need to start out at http://win.meteor.com/ it has different ways to get started in Windows.

I was able to get my sample app up and running in no time. After some simple Hello Worlds, when I started to dig in deep to Meteor, I hit the wall when trying to add a package that was not available through Meteor. In mac you can use ‘mrt’ and everything was peachy. It turned out it was not that difficult to install the packages in windows either. It takes couple of extra steps but other than that it is straight forward. There are an excellent set of instructions available here at https://www.discovermeteor.com/blog/using-meteor-and-atmopshere-on-windows/ and also at http://stackoverflow.com/questions/20949780/how-to-install-meteorite-for-windows

The simple idea is to create folder called packages under project root and clone the package project that you want to use from git. In my case I was trying to use iron-router. Here are the steps I did, on DOS box, go to project/packages folder

git clone https://github.com/tmeasday/meteor-router.git

This should create the meteor-router folder, rename it to iron-router and then clone the three dependencies you need to build iron-router. Stay on packages folder and run following git clone commands. This might change as Meteor matures.

git clone https://github.com/tmeasday/meteor-page-js-ie-support.git

git clone https://github.com/tmeasday/meteor-HTML5-History-API.git

git clone https://github.com/EventedMind/blaze-layout.git

After it downloads remove the ‘meteor’ from the folder names. Also make sure all the files made it to the sub folders. If you have problem getting files down, change to the package folder where you need to get missing files and run the following command

git submodule update –init

I had to run the update in both page-js-ie-support folder and HTML5-History-API and then rerun the git clone again.

Once you have all the files are in place. In DOS box go back the project root folder and install the iron-router.

meteor add iron-router

With the above steps, I was able to install and run the router like a charm in Windows.

Good luck.

Advertisements

One thought on “Adding meteor package in Windows

  1. I tried what you describe here, but I got the following errors:
    “while building package ‘iron-router’:
    error: no such package: ‘router’ …”

    For the other packages I got the same kind of errors.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s