PEM-- / meteor-helper

Meteor.js under Atom.io
http://pem-musing.blogspot.fr/2014/07/meteorjs-from-within-atomio-full-stack.html
MIT License
50 stars 9 forks source link

Does not find packages in PACKAGE_DIR #44

Closed derwaldgeist closed 9 years ago

derwaldgeist commented 9 years ago

I am using the PACKAGE_DIR environment variable to store packages that I re-use across applications in a separate folder. Unfortunately, the meteor helper does not find these packages.

PEM-- commented 9 years ago

It should be. When your Bash exec Atom, the environment variables are copied in the process. When this package fork a process for launching Meteor, the same thing happens.

Does your Atom knows about your environment variables?

You can activate Atom's console using cmi-i, just like in a regular Chrome. In the console, you can type process.env and check if your environment variables are present.

derwaldgeist commented 9 years ago

Thanks for your reply.

No, the PACKAGE_DIRS variable is not present there. Now the big question is: why? I have added the environment variable using the .bash_profile file, like this:

export PACKAGE_DIRS=~/path/to/packages

This works for my bash, but obviously not for Atom. I am using MacOS and starting Atom from the standard applications folder.

PEM-- commented 9 years ago

Can't say. If Atom doesn't see this environment var, this plugin is dead blind.

On my side, I'm always launching Atom from the command line.

derwaldgeist commented 9 years ago

I did a cross-check now: If I use the terminal to start Atom, the environment variable is set. So the problem only occurs if I start Atom the "normal" way.

PEM-- commented 9 years ago

Yep, that's what I though when I led you on this track. Sounds completely related to Atom and not to this plugin.

One way to circumvent this issue could be a setting in your Atom's config.

PEM-- commented 9 years ago

Sounds related to this discussion: https://github.com/atom/atom/issues/3018

A workaround is provided.

derwaldgeist commented 9 years ago

Yes, the problem is indeed broader. I also found this one https://github.com/atom/atom/issues/6956. So this is not related to the package, and I am closing this. It would be helpful, however, if you could add an option to explicitly set the PACKAGES_DIR (with the environment variable's value as its default, if available). This would help us Mac users to workaround it for the time being.

PEM-- commented 9 years ago

Sounds doable. I can lead you on the appropriate track for a PR on this, if you want to contribute.

derwaldgeist commented 9 years ago

Unfortunately, I don't know nothing about Atom's internals, so I won't be able to create a PR.