The following code triggers the .fail() callback immediately:
var hue = require("node-hue-api");
var api = new hue.HueApi();
// ip = '192.168.2.1'
api.registerUser(ip, null, null).then(function(result) {
d.resolve();
console.log('registerUser result:', result);
}).fail(function(result) {
d.reject('button not pressed');
console.error('registerUser error:', result);
}).done();
Which results in an immediate ApiError {message: "link button not pressed", type: 101} in my console. I'm still working on the same project as described in #51, so maybe gulp-browserify is messing something up again?
The following code triggers the
.fail()
callback immediately:Which results in an immediate
ApiError {message: "link button not pressed", type: 101}
in my console. I'm still working on the same project as described in #51, so maybe gulp-browserify is messing something up again?Any ideas on how to solve this?