In every node.js version I tested (6, 8, 10) the UnsetVariableError thrown by this module does not have a stack property because the Error prototype is a weird one to extend from. You need to either use ES6 classes or something like https://github.com/JsCommunity/make-error.