andruschka / pm2-meteor

Simplest way to deploy, scale and run Meteor Apps with PM2.
https://www.npmjs.com/package/pm2-meteor
162 stars 38 forks source link

Using --directory but expecting a tarball #52

Open trymbill opened 7 years ago

trymbill commented 7 years ago

When trying to deploy I'm getting the error Error: No such file. I started looking through the code and found something that might be the cause but my ability to read coffee might be messing with my head :)

In your meteor build cmd found in localTasks you're passing the --directory option to meteor. Meteor documentation states:

--directory         Output a directory (rather than a tarball) for the
                      application server bundle. If the output location exists,
                      it will be recursively deleted first.

A few lines further you're trying to run tar -zcvf [...] which for me fails with the error: Error: No such file which makes sense since there's no tarball to untar. There are also two undocumented variables called bundleTarName and bundleName that default to "bundle" which isn't the default behaviour of Meteor. Meteor creates a bundle named after the project, i.e. "my-project.tar.gz", not "bundle.tar.gz". I tried adding those variables to my pm2-meteor.json but they didn't seem to do anything.

pm2-meteor generateBundle seems to generate the correct bundle but running pm2-meteor deploy after that deletes it, resulting in the same problem described above.

I thought I'd spend the time to explain this here if anyone else is having issues. I would contribute with a pull request but coffescript isn't my strong suit.

crapthings commented 7 years ago

i have same issue, how to make it work ?

Shelagh-Lewins commented 6 years ago

I have the same problem, and would love to know if there is a fix.