const Docker = require('dockerode');
const docker = new Docker();
console.log(docker.getNetwork('test'));
and the error I get is:
TypeError: callback is not a function
at /Users/ekkis/tst/node_modules/dockerode/lib/network.js:43:7
at Modem.buildPayload (/Users/ekkis/tst/node_modules/docker-modem/lib/modem.js:255:7)
at IncomingMessage. (/Users/ekkis/tst/node_modules/docker-modem/lib/modem.js:214:14)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:188:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
if I look at the function I see:
Docker.prototype.getNetwork = function(id) {
return new Network(this.modem, id);
};
In this issue: https://github.com/apocas/dockerode/issues/288 I see code that presumably works, but breaks for me. here's what I'm doing:
and the error I get is:
if I look at the function I see:
and the network constructor looks like this:
so it's not clear to me at all how that error can be generated. what is clear is that the function doesn't require a callback. thoughts anyone?
p.s. working with v2.4.1