play.js icon indicating copy to clipboard operation
play.js copied to clipboard

throw er; // Unhandled 'error' event

Open eguvenc opened this issue 12 years ago • 3 comments

When i run below the code i get an error.

var play = require('play'); // play with a callback play.sound('./wavs/sfx/intro.wav', function(){ }); info - socket.io started playing=>./wavs/sfx/intro.wav

events.js:72 throw er; // Unhandled 'error' event ^ Error: spawn ENOENT at errnoException (child_process.js:975:11) at Process.ChildProcess._handle.onexit (child_process.js:766:34)

eguvenc avatar Apr 26 '13 15:04 eguvenc

I'm getting the same error. Hard to fix as it's deep in parts of node itself. I have node v0.10.7 built on Wheezy/Debian

Con-incidentally, its also at events.js:72. Some kind of unhandled error.

Also, on the readme you say var play = require('play').Play(); I think this should be var play = require('play'); And you call play.on which does not seem to exist in class.

Paul

paultanner avatar Jun 13 '13 14:06 paultanner

Some platforms (such as Debian) don't trigger the exit event after a failed spawn. It will trigger the error event instead. Since play.js isn't handling the error event the process is terminated.

watsoncj avatar Dec 17 '13 22:12 watsoncj

I get pretty much get every error listed above, from my perspective this module is completely broken. :/

MichaelMcKavanagh avatar Mar 23 '14 03:03 MichaelMcKavanagh