spmjs / node-scp2

[MAINTAINER WANTED] A pure javascript scp program based on ssh2.
385 stars 96 forks source link

Exception while instantiating scp #24

Open prabhash1785 opened 9 years ago

prabhash1785 commented 9 years ago

am using scp2 for file transfer in my Node.js program. As per the instruction on npmjs.com, I tried to do following:

var Client = require('scp2').Client;

var client = new Client({ port: 22 });

But in the above code, the program fails to instantiate Client and it complains that Client is undefined. Am I missing somthing in the document? Can you please help?

austinkeeley commented 9 years ago

I think the scp.js file is missing this line:

exports.Client = Client;

You can add it in at the bottom and it works.

prabhash1785 commented 9 years ago

Oh cool! Are you going to send a PR for this?