// Stack frames point at the guest's own lines, in the entry and in a required module. const where = (e) => e.stack.split("\n").map((l) => l.match(/(\w[\w-]*\.cjs):(\d+):(\d+)/)).find(Boolean).slice(1).join(":"); console.log(where(new Error("entry"))); console.log(where(require("./stackline-dep.cjs")()));