【发布时间】:2015-10-23 01:24:14
【问题描述】:
无法读取未定义的 nodeJS 的属性“数据”,我正在尝试使用 nodejs 提交目录
var SvnLib = require('svnlib');
Client = new SvnLib ({
cwd: './Users/Safa/Desktop/test2',
username: 'username', // optional if authentication not required or is already saved
password: 'password', // optional if authentication not required or is already saved
});
Client.update(function(err, data) {
console.log('updated');
});
Client.getInfo(function(err, data) {
console.log('Repository url is %s', data.url);
});
【问题讨论】:
-
回调中的
err参数用于检查错误。通常情况下,如果设置了,data参数是没有的。
标签: javascript node.js svn