Closed senthanal closed 9 years ago
I think, I found the answer. gulp-ssh works with ssh2-streams version 0.0.15 but not with 0.0.16 which is the latest as of I see from the dependency list of gulp-ssh. Could it be?
I have updated dependencies version. is it work for you?
same problem here:
_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 /Users/roberto/web/sautil.com.br/api/gulp/node_modules/gulp-ssh/node_modules/ssh2/node_modules/ssh2-streams/lib/sftp.js:2752:14
at state.requests.(anonymous function).cb (/Users/roberto/web/sautil.com.br/api/gulp/node_modules/gulp-ssh/node_modules/ssh2/node_modules/ssh2-streams/lib/sftp.js:960:15)
at SFTPStream._cleanup (/Users/roberto/web/sautil.com.br/api/gulp/node_modules/gulp-ssh/node_modules/ssh2/node_modules/ssh2-streams/lib/sftp.js:190:38)
at SFTPStream.end (/Users/roberto/web/sautil.com.br/api/gulp/node_modules/gulp-ssh/node_modules/ssh2/node_modules/ssh2-streams/lib/sftp.js:160:8)
at SFTPWrapper.end (/Users/roberto/web/sautil.com.br/api/gulp/node_modules/gulp-ssh/node_modules/ssh2/lib/SFTPWrapper.js:29:23)
at WriteStream.
It is bug comes from ssh2-streams@v0.0.16, ssh2-streams@0.0.15 work well. @mscdex
Could you help me? What do I need to do?
You can cd gulp-ssh/node_modules/ssh2 && npm i ssh2-streams@0.0.15
I will try to fix ssh2-streams some time later
Hello, let me know if this patch on top of master fixes things for you or not. Either way, it'd be good to have a test case for this.
@monkerek The patch work fine in gulp-ssh
OK, ssh2-streams@0.0.15 it's working for me now. I made a postinstall file to fix it. It will install 0.0.15 after install package.json project.
Create a file called postinstall.js and copy the content bellow:
var exec = require('child_process').exec;
exec(
'cd node_modules/gulp-ssh/node_modules/ssh2 && npm i ssh2-streams@0.0.15',
function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
}
);
Add into your package.json this:
"scripts": {
"postinstall" : "node ./postinstall.js"
}
Run the install command again
$ npm install
@betorobson This issue will soon be fixed, @mscdex is ssh2's author
That is grate, until it be fixed, I made the postinstall script for some members of my team which are not able to run some gulp taks that need sftp method working properly.
I'm waiting for this fix, thank you :)
I've published a new version of ssh2-streams
that has the fix I previously linked to.
Thank you mscdex, it is working perfect. It solved my issue :)
Hi, gulp-ssh was working without troubles but after running npm install(npm install) breaks with error.
Seems like problem comes from the ssh2 node module. Any help would be great! Thanks for the nice gulp plugin :)