What if `er && er.code === "ENOENT"`? I think you need an intermediate case here that calls `repo_(n, cb)` instead of `repo_(d.name, cb)`.