I am looking for someone who has experience working in a meteor dev team with different environments.
I have a project with two meteor apps that share the some custom packages. The repo structure is kind of like this:
and I created symlinks in the adminApp/packages folder that point to the /packages folder.
I read the git support for windows thread with @dandv pushing for support of symlinks on windows but I don’t understand the applied fix. The symlinks on windows appear as files but meteor is not able to find the packages.
How can I have this type of repo that can be cloned in windows ? Or what are the workarounds possible ?
One solution could be to ignore the symlinks the app/packages folders and to run a script after each pull to create them using ln -s or mklink depending on the platform.
What do you think about that ? Could there be an easier approach ?
I thought there was a way to define a global package directory, but I can’t find it in the docs at the moment. Maybe it was for an old version of Meteor.
Oh yeah! There seems to be a PACKAGES_DIR environment variable as stated here http://stackoverflow.com/a/28070364/4265107
Maybe @serkandurusoy has some input on this ?
PACKAGES_DIR is a list of directories in which to look for packages. Directories are delimited by the appropriate separator character (
: in linux,
; in windows).
Local package directories are searched first when building an app.
For example (linux):
Yep, exactly as @robfallows has explained. You’ll of course need to set up your environment variables at
computer properties > advanced system properties > environment variables
or use the
set command on the command prompt like:
C:\> set PACKAGE_DIRS="C:\pathtoyourprojectgrouproot\packages;C:\somegloballyavailablelocalmeteorpackages\"
Thanks a lot to you both! I think this is the most simple solution for this problem.
It would be nice that some blogger with a lot readers would a little article on this so that future people in my position would find a solution easily. Or maybe even better: create an “environment variables” section in the docs that list all of the variables used by meteor.
These are all the
process.env.XXXX I grep’d out of the current codebase (E&OE):
https://dweldon.silvrback.com/local-packages and http://themeteorchef.com/recipes/writing-a-package/#tmc-local-packages discuss that, and these guys are pretty popular with their blog posts and tutorials.
Although I admit I don’t enjoy their material as much as I do funny kittens just kidding of course, they are indeed two great meteor resources
@robfallows now you have to write a blog post explaining all of these. You just cannot leave it hanging in the air like that
Alright then I’ll do my research more thoroughly next time no need to take the piss (even thought it’s well deserved).
I can explain the grep.
I can even explain some of the env variables…
… but I was kinda hoping someone else might like to jump in
On the same topic. I’ve got the same structure as @elgusto and haven’t quite figured out the workflow for making git commits that pull in package contents. I just end up committing the symlinks.
Does anyone know of a step by step tutorial for getting this working? I’m using a Mac.
@babrahams @elgusto what I do when I need to dissect an app into shared local packages, is to make my git root the topmost folder containing apps and packages
PACKAGE_DIRS to point at
Since I commit the
project directory, I can easily track and share the changes to everything.
I use the
misc directory for some docs, configuration files that are not security-sensitive etc.
@serkandurusoy - Legit. Thank you so much.
By the way, I should have said this a long time ago … Every time I see a post of yours on these forums, I read it with interest. For me, you’re the voice of reason when things get heated, and a constant source of useful knowledge for all of us. Major respect.
Wow, I really don’t know what to say! Thank you @babrahams this means a lot!
Was it this thread?
Make sure to install the right git for Windows. The release from July 18 claims to handle symlinks on Windows.
@dandv Yes this is the one! It got pretty heated in the end…
Thank you for the heads up converning the right version!
Hi, are you using this with galaxy deploy? I don’t know if this will work. Will deploy command understand package_dirs and upload these folders inside my app or your packages are published in atmosphere?
Yes it will understand that because deploy is basically a “build and upload”.