Ftp doesnt work

im trying to download a file from an ftp server

var Client = require(‘ftp’);

var c = new Client();
c.on(‘ready’, function() {

c.get(`remotepath`, function(err, stream) {
  if (err) {
    console.log(err)
  } else console.log("worked")
  stream.once('close', function() { c.end(); });
  stream.pipe(fs.createWriteStream("localpath"));
});

});
c.connect({host:"", port:29121, user:"",password:""});

when i run this command on my pc it works but when i run it on glitch.com i get an error
TypeError: Cannot read property ‘once’ of undefined

Glitch doesn’t work with that port.

Ports available on glitch- 3000/8080 etc