Super weird Meteor behavior (net object only available in meteor shell)

I’m wondering if someone can explain this one, because I’m scratching my head over here.

I’ve got a Meteor method that uses Node.js net to connect to a TCP server:

const client = net.connect({host: '', port: 23});

It errors out, saying “net is not defined.” However, when I open a terminal and run meteor shell and run the exact same command, it works! :confused: And then once I’ve referenced net in the meteor shell, the Meteor method in my app works. What the…

How do I use net in Meteor then?