I am trying to use Gulp to FTP files from my local to a remote shared server site, however, I get the error:
Error: getaddrinfo ENOTFOUND ftps.mysite.com ftps.mysite.com:21 at errnoException (dns.js:50:10) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
Googling for solutions I see that this is a common issue with using the \
character in the username, but my username is does not have that.
My code on my gulpfile.js is:
gulp.task('ftp-deploy', function() {
var conn = ftp.create({
host: 'ftps.mysite.com',
port: 21,
user: '[email protected]',
password: 'mypassword123',
parallel: 10,
log: gutil.log,
});
var localFilesGlob = ['css-dist/**'];
return gulp.src(localFilesGlob, { base: './css-dist/', buffer: false })
.pipe( conn.newer( '/css' ) )
.pipe( conn.dest( '/css' ) )
;
});
I tried replacing @
with %40
but that made no difference.
Would anyone know how I could fix this? Is there perhaps another way I should be writing @
to work as a string in JS?