morris / vinyl-ftp

Blazing fast vinyl adapter for FTP
Other
388 stars 31 forks source link

Error: Timed out while making data connection #101

Open Nekiy2 opened 7 years ago

Nekiy2 commented 7 years ago

node 6.9.2 gulp 3.9.1 vinyl-ftp 0.6.0

Cant connect to my server:

gulp.task('ftp', function () {
  var conn = ftp.create( {
        host:     'myhost',
        user:     'login',
        password: 'psw',
        parallel: 10,
        log:      ftp.log
    } );

    var globs = [
        'css/**',
        'js/**',
        'img/**',
        '*.html'
    ];

    // using base = '.' will transfer everything to /public_html correctly 
    // turn off buffering in gulp.src for best performance 

    return gulp.src( globs, { base: '.', buffer: false } )
        .pipe( conn.newer( '/pathtomyfolder' ) ) // only upload newer files 
        .pipe( conn.dest( '/pathtomyfolder' ) );
});

After run task i get console log:

[11:41:44] Using gulpfile pathtomylocalfolder\sitebuild\gulpfile.js
[11:41:44] Starting 'ftp'...
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: Timed out while making data connection
    at Timeout.<anonymous> (pathtomylocalfolder\sitebuild\node_modules\ftp\lib\connection.js:901:12)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5)

I dont understand this line:

 events.js:160
      throw er; // Unhandled 'error' event
      ^