ENOENT error on both nodester and heroku #39

Michieljoris opened this Issue Nov 23, 2011 · 3 comments


None yet

3 participants

Missing packed-refs in both cases.
Wheat works on my local machine.
Did get it to work on ec2, after doing a git pack-refs.

heroku logs

2011-11-23T02:59:24+00:00 app[web.1]: /app/node_modules/wheat/lib/wheat.js:75
2011-11-23T02:59:24+00:00 app[web.1]: if (err) { throw err; }
2011-11-23T02:59:24+00:00 app[web.1]: ^
2011-11-23T02:59:24+00:00 app[web.1]: Error: ENOENT, No such file or directory '/app/packed-refs'

woloski commented Jan 5, 2012

to workaround you could execute spawn a child process and execute git pack-refs before the sever starts.
I'm wondering how you are running it in ec2? do you expose the repo and push there? how you do that?
I'm running it in Windows Azure and I had to setup a bare repo on startup and create a post-hook on github pointing to my blog to trigger a fetch to update. Am I missing something?

aaronfay commented Aug 6, 2012

I believe this issue is related to creationix/node-git#6, although the pull request hasn't been accepted yet. I'm experiencing the exact error deploying to Heroku.

I take back my comment, the issue on Heroku seems to be more complex, as the dyno /app folder is not the 'gitFolder' git-fs is expecting, so a few files are missing, as well as related repo information. At this point I'm not sure there's an easy fix for this, as Heroku's deployment seems to obscure the actual cloned repository. Restarts also appear to wipe out any files written to the app folder as well.

aaronfay commented Aug 6, 2012

After a little more research, it appears this issue cannot be fixed. The actual files deployed on a Heroku dyno instance are only the project files without the .git folder. A wheat dependency (git-fs) is expecting to find the .git repo in place so it can read shasums (see https://github.com/creationix/node-git/blob/master/lib/git-fs.js#L115). At this point 'gitDir' is the project directory, and neither the 'packed-refs' or 'HEAD' files exist. Even if they did, they wouldn't have the proper content, I suspect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment