I am trying to connect to ftps server using node js. I am using "https://www.npmjs.com/package/basic-ftp" module. but its giving me following error. I have tried many modules but same error is occured. Please help me out
index.js
const ftp = require("basic-ftp")
example();
async function example() {
const client = new ftp.Client()
client.ftp.verbose = true;
try {
const secureOptions = {
rejectUnauthorized: false,
host: "xxx.xxx.com",
port:990
};
await client.access({
host: "xxx.xxx.com",
port:990,
user: "xxxx@xxxx.xxx",
secure:true,
password: "xxxxxx",
secureOptions : secureOptions
});
}
catch(err) {
console.log(err)
}
}
Error: Timeout (control socket)
at Socket.socket.once (D:\node\basicftp\node_modules\basic-ftp\dist\FtpConte
xt.js:310:58)
at Object.onceWrapper (events.js:286:20)
at Socket.emit (events.js:198:13)
at Socket._onTimeout (net.js:442:8)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)