I'm currently working on a class project dealing with MPD and I'm attempting to use Komponist. I'm running into an issue when trying to connect to my currently running MPD server.
Here I have the following code that just attempts to create a connection to my MPD server.
var komponist = require('komponist');
var client = komponist.createConnection(6600, 'localhost', function() {
console.log('Connected!');
});
However, when I try to execute this code the Chrome debugger's returning "Cannot read property 'apply' of undefined " and it's pointing to this:
MPDClient.prototype.connect = function() {
var returnVal = MPDClient.super_.prototype.connect.apply(this, arguments); //This line
this.write = MPDClient.prototype.write;
return returnVal;
}
At first I thought it was because MPD simply wasn't running or there was a connection issue but my MPD server is running on localhost:6600 and I can connect to it just fine from another third party client, so I'm wondering if I'm missing a library or some other dev dependencies to use komponist. I'm not familiar with the "super_" notation.
This shouldn't matter but I'm using Windows, so it's a Windows binary of MPD. My version of Node is 0.10.31
Or, if anybody else has any good recommendations for an existing JavaScript MPD client throw them my way.