In tracing the failure, it occurs in a block of code that looks like the following.
The exception that occurs is
Code: Select all
{
"name":"PhidgetError",
"errorCode":35,
"message":"connect ECONNREFUSED ::1:5661",
...
}
Code: Select all
var phidget22 = require('phidget22');
connect() {
var self = this;
var conn = new phidget22.Connection(5661, 'localhost');
conn.connect().then(()=>{
....
}).catch(e=> {
console.error(e);
throw e;
});
}
UPDATE 2023-08-17
This issue is currently resolved. While I don't 100% know what caused it, I will note that the JavaScript libraries appear to have a range of driver versions with which they are compatible. This solution is a couple of years old, and it is possible that one of those compatibility boundaries was crossed. In response to the updated driver, I ended up updated the node library version and making small updates to code because of the change in the name of a class from a previous JavaScript SDK version to the current version.