I think, you should make thees changes `SftpDeploy.prototype.upload = function (file, callback) { this.client.upload(file.filepath, file.dest, callback) }` In your case I have error during upload when folder isn't exists.