“spawn ENOENT” error while connecting to svn from javascript

大城市里の小女人 提交于 2019-12-23 02:30:12

问题


I'm developing a web server that should be able to connect to svn, gather and process data like change logs. I've found an npm module for node.js that is called 'svn-spawn'. I have a local checkout of a project, located in the folder 'D:\Projects\TankBattles'. Everything looks good, but when I tried to get logs I received an error "spawn ENOENT" . Could you help me to resolve the error. I'm on Windows 8 x64.

var q = require('q');
var SVNClient = require('svn-spawn');
var client = new SVNClient({
    cwd: 'D:\Projects\TankBattles'
});

var repository = {
    log: function () {
        var deferred = q.defer();
        try {
            client.log([], function (err, data) {
                // err is "spawn ENOENT"
                deferred.resolve(data);
            });
        }
        catch (err) {
            deferred.reject(err);
        }
    }
};

module.exports.repository = repository;

P.S. I'm new in node.js and can do something wrong.

来源:https://stackoverflow.com/questions/28052758/spawn-enoent-error-while-connecting-to-svn-from-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!