The module searchers in the `require` package should return a string if the module is not found, and not raise an error. See: https://www.lua.org/manual/5.3/manual.html#pdf-package.searchers Also make error strings contain newlines and tabs just like the original ones.