1

I'm trying to autodeploy my project using node.js and Github webhooks. I followed this tutorial, but I'm getting this execFile function error:

{ [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn' } 

I checked the shell script (hook.sh) file location and the fs.exists function says it's ok. I tried to exec other file than a shell script and it worked (or at least it found that file). So it might be some kind of problem with the bin/bash. I really don't know. The shell script file is located in the same directory as the hook.js file (see the tutorial).

My webhost is WebFaction.

2
  • would be cool if you provide some code snippets. Are you using spawn or execFile? Commented Mar 18, 2014 at 8:20
  • I use almost the same code as you can find in that tutorial (execFile). Commented Mar 18, 2014 at 8:31

1 Answer 1

1

My suggestion is to go over following steps

  1. Check the execution permission of hook.sh script by ls -l. You can try to set temporarily the permission for execution to all with sudo chmod a+x <PATH TO MY HOOK.SH>
  2. Be sure that here you are using the execFile('/path/to/hook.sh', execOptions, function(error, stdout, stderr) absolute path to the hook.sh script. If its not working try to point it to some dummy script which for example touches some file on file system.
  3. If none of above mentioned points helps. Turn the debugging mode of bash by running following command set -x. And check if the shell starts the execution of hook.sh at all
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.