Cloning Meteor packages

When I git pull a Meteor package into my packages folder, it works fine on that computer and uses the cloned version of the package, but when I load the project on another computer it uses the original package (not the cloned one). How can I ensure that the git cloned packages also get installed on other computers running the project?

In the version on the other computer, is the package there with all its files?
My guess is this is an issue with git submodules. It’s been a few years since I worked with them, but back then at least they were more trouble than they were worth.

You have two main options:

  1. Ensure your packages/ folder is included in your git project, or…
  2. Change the package’s namespace and publish it. Ensure the original package is removed (meteor remove old-package-name or remove the entry from .meteor/packages) and you’ve added your new package (meteor add new-package-name or add to .meteor/packages).

packages is in my repo. I do believe this is something to do with git submodules. The cloned repos don’t get saved. Only if I remove .git from the cloned package does it work, but then I can’t easily pull changes made to the package.

Thanks. Yeah, I believe it is this issue. I will look through the post.

It’s very unusual to add a Meteor package like this, unless you’re wanting to make changes to the base package - and even then you’d git clone (or git clone --recursive if you’ve got submodules), not git pull.

However, I don’t know of any Meteor packages that use git submodules (as @gunn says, they’re pretty horrible).

Which package is this?

It applies to all my packages with local changes. I git clone them into the packages directory and then if I go on github for example they show up as a link. The point of git cloning into my project is to make local fixes.

Ah - okay. Each of those clones has its own .git/ folder, which is effectively turning them into git submodules. Just delete those .git/ folders:

rm -rf packages/packagename/.git`

Ya. I do that already. But then I can’t easily pull in updates to these repos