I am new to nodeJS and I am trying to access SVN using the package svn-spawn. My code is given below.
var Client = require('svn-spawn');
var client = new Client({
cwd: 'C:\\SVN\\Source Code',
username: 'abcd',
password: 'xyz',
});
client.getInfo(function(err, data) {
console.log('Repository url is %s', data.url);
});
But I am getting the following error on execution:
console.log('Repository url is %s', data.url);
^
TypeError: Cannot read property 'url' of undefined
at C:\NodeJS\SvnTest.js:9:45
"data" is undefined.