Closed noel35 closed 8 years ago
HIi @noel35, are you sure to have the lftp
command installed?
Try to launch the lftp
command on your terminal and tell me what it shows.
I got this while using the build of LFTP for windows and running Node from within Visual Studio Code, simply running it from a command prompt with the correct PATH variable worked for me.
Hi,
my code :
var zipFilename = 'allNew.zip'; var dir = 'public/ft'; var ftps = new FTPS({ host: 'ftp.xxxxx.xxxx.net', // required username: 'xxxxxx', // required password: 'xxxxxxx', // required protocol: 'sftp', // optional, values : 'ftp', 'sftp', 'ftps',... default is 'ftp' // protocol is added on beginning of host, ex : sftp://domain.com in this case port: 22, // optional // port is added to the end of the host, ex: sftp://domain.com:22 in this case escape: true // optional, used for escaping shell characters (space, $, etc.), default: true }); ftps.cd('ftp/').addFile(dir + '/' + zipFilename).exec(console.log);
Why got then error message : { [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn' } { error: null, data: '' }
Please, Help me, thank you.