teambition / gulp-ssh

SSH and SFTP tasks for gulp
184 stars 38 forks source link

_stream_writable.js: TypeError: object is not a function #30

Closed silvioprog closed 9 years ago

silvioprog commented 9 years ago

Hello,

I'm trying to copy just an index.html file from my machine to the machine server, and I'm getting the following error [1].

This is my simple task [2] and I'm using Ubuntu 14.04 64 bits and NodeJS v0.12.7.

[1]

duall@duall-dev:~/dev/git/duallsite$ gulp client:publish
[12:41:14] Using gulpfile ~/dev/git/duallsite/gulpfile.js
[12:41:14] Starting 'client:publish'...
[12:41:15] gulp-ssh :: Connect...
[12:41:17] gulp-ssh :: Ready
[12:41:17] Preparing to write "/home/ubuntu/__SITE_TMP/index.html"
[12:41:18] Writing '/home/ubuntu/__SITE_TMP/index.html'
[12:41:18] Finished writing '/home/ubuntu/__SITE_TMP/index.html'
_stream_writable.js:313
    cb(er);
    ^
TypeError: object is not a function
    at onwriteError (_stream_writable.js:313:5)
    at onwrite (_stream_writable.js:335:5)
    at WritableState.onwrite (_stream_writable.js:105:5)
    at /home/duall/dev/git/duallsite/node_modules/gulp-ssh/node_modules/ssh2/node_modules/ssh2-streams/lib/sftp.js:2752:14
    at state.requests.(anonymous function).cb (/home/duall/dev/git/duallsite/node_modules/gulp-ssh/node_modules/ssh2/node_modules/ssh2-streams/lib/sftp.js:960:15)
    at SFTPStream._cleanup (/home/duall/dev/git/duallsite/node_modules/gulp-ssh/node_modules/ssh2/node_modules/ssh2-streams/lib/sftp.js:190:38)
    at SFTPStream.end (/home/duall/dev/git/duallsite/node_modules/gulp-ssh/node_modules/ssh2/node_modules/ssh2-streams/lib/sftp.js:160:8)
    at SFTPWrapper.end (/home/duall/dev/git/duallsite/node_modules/gulp-ssh/node_modules/ssh2/lib/SFTPWrapper.js:29:23)
    at end (/home/duall/dev/git/duallsite/node_modules/gulp-ssh/index.js:253:18)
    at DestroyableTransform._flush (/home/duall/dev/git/duallsite/node_modules/gulp-ssh/index.js:286:5)

[2]

gulp.task('client:publish', function () {
    return gulp
        .src([paths.dist + '/index.html'])
        .pipe(gulpSSH.dest('/home/ubuntu/__SITE_TMP/'));
});

Is gulp-ssh compatible with this environment?

Thank you!

Glutnix commented 9 years ago

I also am getting the same error when using gulpSSH.dest

Glutnix commented 9 years ago

Turns out this issue is related to #28

silvioprog commented 9 years ago

NIce. I'm waiting for this fix, thank you! =)