ReferenceError:当我尝试使用Nodegit

时间:2016-05-02 10:16:56

标签: git path redux nodegit

当我尝试在react-redux项目中打开我的存储库时,我收到此错误。我的代码是:

var localPath = require("path").join(__dirname,"./app/repository/project0");
var nodegit = require('nodegit');
console.log(localPath);
nodegit.Repository.open(localPath)
.then(function(repoResult) {
    repo = repoResult;
    return repoResult.openIndex();
}, function (reasonForFailure) {
 res.json({message: reasonForFailure})
 console.log(reasonForFailure)

}

我确定路径是正确的。我也尝试多次更改路径,说明.git文件夹,但它仍然无法正常工作。谢谢你的帮助!

0 个答案:

没有答案