I\'m adapting a library that uses callback to use Promises. It\'s working when I use then(), but it doesn\'t work when I use await.
You may not need async await abstraction really. Why don't you just simply promisify dbc.solve() function with a promisifier like;
function promisify(f){
return data => new Promise((v,x) => f(data, (err, id, sol) => err ? x(err) : v({i:id, s:solution})));
}
You will have a promisified version of your dbc.solve() and if it doesn't fire an error you will be returned with an object like {i:id, s: solution} at it's then stage.