1

i get this error when i try to open my repository inside my react-redux project. My code is:

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)

}

I'm sure that path is right.I also tried to change my path several times, expliciting the .git folder, but it still doesn't work. thanks for the help!

0 Answers0