4 const configurationError = require("./configurationError");
5 const resolveFrom = require("resolve-from");
7 module.exports = function(
11 // First try to resolve from the provided directory,
12 // then try to resolve from process.cwd.
13 let path = resolveFrom.silent(basedir, lookup);
15 path = resolveFrom.silent(process.cwd(), lookup);
18 throw configurationError(
19 `Could not find "${lookup}". Do you need a \`configBasedir\`?`