Closed ogroppo closed 6 years ago
@ogroppo what OS do you use?
Hi there, using macOS High Sierra
@ogroppo
can you replace function callerPath()
by
function callerPath() {
var err = new Error()
var re = /at require \(internal\/module\.js:11:18\)\n.+\((.*):\d+:\d+\)/m
return err.stack.match(re)[1]
}
in index.js of sexy-require?
I can't test it right now as I don't have the macOS. If it is OK I will patch it.
@ogroppo Hi! Have you check it?
Sorry mate, I deleted that project now and I am not able to recreate that scenario in a new one. However, I'll be using this package now so I'll let you know if that happens again! cheers
TypeError: Cannot read property '1' of null at callerPath (/node_modules/sexy-require/index.js:41:29) at getRoot (/node_modules/sexy-require/index.js:52:22) at rootPath (/node_modules/sexy-require/index.js:59:14) at Module.require (/node_modules/sexy-require/index.js:84:30)