How to install meteor package direct from github

There is a package on Atmosphere called ashkettle:ngmaterial, but it is outdated. I found somebody forked it on github and updated the dependencies it uses (Angular-Material).

But the person who made the fork did not put a package on Atmosphere. So is there a way to install this meteor package direct from github? https://github.com/itsdeluxe/ashkettle-ngmaterial

Or do I need to figure out how to wrap it into a package myself and install it locally? Or can I just copy all the files to a specific place in my project?

Thanks

3 Likes

Git clone the fork into the top level packages folder of your application then run meteor add package:name and everything should work as expected.

7 Likes

It works exactly how you said, thanks!

2 Likes

Quick tip: keep in mind that some developers choose to publish their packages on the Meteor packaging server but keep them hidden from Atmosphere. It appears your package fits this scenario.

I always do a quick meteor search package:name before installing anything locally in case it’s simply not published to Atmosphere. Of course, I wouldn’t ever use an unpublished package for a production app, but I do occasionally use unpublished packages just to speed up prototyping.

1 Like

Glad I could help!

@chadkruser another reason to clone a package into your project if it isn’t published it to customize it to your specs. There are a lot of great packages out there but sometimes they don’t do one thing that you need so forking, cloning, and editing is the code directly is a good alternative, especially if the feature you want probably wouldn’t get merged in. Plus, if it breaks you have the ability to fix it manually :smile:

1 Like

I must be stupid but I can’t get this to work

$ cd packages
$ git clone git@github.com:greggman/meteor-disqus.git
$ cd ..
$ meteor add greggman:meteor-disqus
=> Errors while parsing arguments:           
                                          
While adding package greggman:meteor-disqus:
error: no such package

$ meteor add package:greggman/meteor-disqus
=> Errors while parsing arguments:           
                                          
While adding package package:greggman/meteor-disqus:
error: Package names can only contain lowercase ASCII alphanumerics, dash, dot, or colon, not "/".

$ meteor add package:meteor-disqus
=> Errors while parsing arguments:           
                                          
While adding package package:meteor-disqus:
error: no such package

$ meteor add meteor-disqus
=> Errors while parsing arguments:           
                                          
While adding package meteor-disqus:
error: no such package
$ ls packages
meteor-disqus 

What am I doing wrong?

Look for the package name in ‘package.js’

Try meteor add visudare:disqus

The package name is different than the github username.

thank you. That was it

1 Like

Hey, this is less than awesome because now I’m checking a package repo into my project repos. Every time the package repo changes, I’ll need to pull and commit in 6 other project repo’s. That’s not good.

What I really want is to fork the package on github, then have meteors build pull the package from git.

How is that configured?

I really miss the feature to directly install packages from GitHub, too. Especially as there are a lot of broken packages on Atmosphere these days and no way to flag them and get them removed (e.g. Issue #413 or Issue #415).

2 Likes

Meteorite still works for me, and apparently there’s a new one, MeteorGitPackages

They both allow you to define packages that point to a git repo and branch, and download them and create symlinks into your project’s packages folder.

Just in case, I don’t run application with meteorite anymore, I just use mrt install or mrt update.

I’m trying to install ngImgCropFullExtended as a local package from git.

It get error: no such package on all my attempts, but I notice that the package does not have a package.js file. Is this why it won’t install?

as a side note, you might have to create your applications /packages folder inside your meteor project! I didn’t see it so I assumed higher level packages folder lol that and that doesn’t work… but following these instructions did!

1 Like

What if there’s no name defined in package.js?

EDIT: Ah, you just match the name of the folder that is inside packages. For example, if you have packages/what-ever with no name inside of package.js, then just meteor add what-ever works.