Marak/say.js

Uncaught Error: spawn festival ENOENT - Travis CI

Closed this issue · 5 comments

I've created an API endpoint that fires Say.js.

I've set up tests using Mocha and Chai that pass fine in my local environment, but when I push everything up to Travis, the build fails with the error:

Uncaught Error: spawn festival ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:247:19)
at onErrorNT (internal/child_process.js:431:16)
at processTicksAndRejections (internal/process/task_queues.js:81:17)

Any thoughts on what's going on? Is it because Travis is trying to access a module it does't have access to? (Say.js) Or is there something else I need to do?

It creates the same error when my server is deployed on Heroku:

2019-04-06T18:21:34.916074+00:00 heroku[router]: at=info method=OPTIONS path="/speech" host=stor .... [06/Apr/2019:18:21:34 +0000] "OPTIONS /speech HTTP/1.1" 200 0
2019-04-06T18:21:35.066435+00:00 app[web.1]: events.js:174
2019-04-06T18:21:35.066440+00:00 app[web.1]: throw er; // Unhandled 'error' event
2019-04-06T18:21:35.066442+00:00 app[web.1]: ^
2019-04-06T18:21:35.066443+00:00 app[web.1]:
2019-04-06T18:21:35.066445+00:00 app[web.1]: Error: spawn festival ENOENT
2019-04-06T18:21:35.066447+00:00 app[web.1]: at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
2019-04-06T18:21:35.066450+00:00 app[web.1]: at onErrorNT (internal/child_process.js:415:16)
2019-04-06T18:21:35.066451+00:00 app[web.1]: at process._tickCallback (internal/process/next_tick.js:63:19)
2019-04-06T18:21:35.066458+00:00 app[web.1]: Emitted 'error' event at:
2019-04-06T18:21:35.066460+00:00 app[web.1]: at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
2019-04-06T18:21:35.066461+00:00 app[web.1]: at onErrorNT (internal/child_process.js:415:16)
2019-04-06T18:21:35.066463+00:00 app[web.1]: at process._tickCallback (internal/process/next_tick.js:63:19)
2019-04-06T18:21:35.182077+00:00 heroku[web.1]: State changed from up to crashed
2019-04-06T18:21:35.150591+00:00 heroku[web.1]: Process exited with status 1
2019-04-06T18:21:35.082049+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=POST path="/speech" host=stormy-reef-84945.herokuapp.com request_id=fb5acb92-de34-44e2-9719-1efc46b4a83a fwd="107.220.87.72" dyno=web.1 connect=0ms service=82ms status=503 bytes=0 protocol=https

I believe you don't have festival installed on your machine. You can try to run that command in a terminal to test.

  throw er; // Unhandled 'error' event
  ^

Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:247:19)
at onErrorNT (internal/child_process.js:431:16)
at processTicksAndRejections (internal/process/task_queues.js:81:17)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:253:12)
at onErrorNT (internal/child_process.js:431:16)
at processTicksAndRejections (internal/process/task_queues.js:81:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! shopping@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the shopping@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\crey\AppData\Roaming\npm-cache_logs\2019-05-19T08_33_31_991Z-debug.log
how can i handle this error

@tlhunter - I’d tried installing festival but made no difference. I’m guessing it’s because Say.js uses a devices in-built speech functionality and Travis/Heroku doesn’t have access to it so it fails.

@willnix86 The Travis servers probably don't have audio devices and therefore fails. A server room full of say.js acceptance tests would be quite funny.

@CredoChakwira are you running your application via powershell? You probably want to open a separate issue, could be Windows specific.