You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
J'essaye de faire fonctionné un script nodejs avec constellation mais ça me donne l'erreur suivants :
TypeError: $.hubConnection[("createConstellation" + type)] is not a function
at ConstellationContext.createHub (/tmp/test/node_modules/constellation-nodejs/lib/constellation.js:126:77)
at ConstellationContext.getControllerHub (/tmp/test/node_modules/constellation-nodejs/lib/constellation.js:140:21)
at ctx.init.then (/tmp/test/node_modules/constellation-nodejs/index.js:24:28)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Mon script (Exemple dans le readMe) :
var ConstellationHub = require('constellation-nodejs');
//// Without configuration file
var c = new ConstellationHub("test", "test", "AmbientSensor", "1.8.2"); //// AmbientSensor represents the name of the application (package)
//// Create a Controller Hub
c.Controller()
.then((ctx) => {
ctx.on('connected', () => {
console.log("CONNECTED");
//ctx.hub.server.writelog("SentinelPI", "{ 'test' : 'ok' } ");
});
return ctx.connect();
});
//// Create a Consumer Hub
c.Consumer()
.then((ctx) => {
ctx.on('connected', () => {
console.log("CONNECTED");
//// subscribe
ctx.hub.client.registerStateObjectLink("R2D2", "Vera", "Flood Sensor (temperature)", "*", function (so) {
console.log(so.Value.Temperature);
});
});
return ctx.connect();
});
//// Create a Sentinel Hub
c.Sentinel("Corulag")
.then((ctx) => {
ctx.on('connected', () => {
console.log("CONNECTED");
ctx.hub.server.writelog("SentinelPI", "{ 'test' : 'ok' } ");
});
return ctx.connect();
});
J'utilise la version 8.2.1 de node et 5.3.0 de npm. De plus, j'ai essayé avec une anciens version de node(6.11.1) et j'ai toujours la même erreur. Pour l'éxécution, je fait "node test.js"
The text was updated successfully, but these errors were encountered:
J'essaye de faire fonctionné un script nodejs avec constellation mais ça me donne l'erreur suivants :
Mon script (Exemple dans le readMe) :
J'utilise la version 8.2.1 de node et 5.3.0 de npm. De plus, j'ai essayé avec une anciens version de node(6.11.1) et j'ai toujours la même erreur. Pour l'éxécution, je fait "node test.js"
The text was updated successfully, but these errors were encountered: