Running the basics of this NPM plugin gives this error message. It doesn't allow the code to run fully, so the plugin is quite useless for me as it stands now.
I found the createSecurePair in starttls.js, line 7, but no idea how to fix this...
pair = require('tls').createSecurePair(sslcontext, false);
Also found this, which seems to describe the problem and a solution:
https://nodejs.org/dist/latest-v6.x/docs/api/tls.html#tls_class_securepair
which says:
Note: The tls.createSecurePair() method is now deprecated in favor of tls.TLSSocket(). For example, the code:
pair = tls.createSecurePair(/* ... */);
pair.encrypted.pipe(socket);
socket.pipe(pair.encrypted);
can be replaced by:
secure_socket = tls.TLSSocket(socket, options);
where secure_socket has the same API as pair.cleartext
```.