Use the internal require() machinery to look up the location of a module, but rather than loading the module, just return the resolved filename.
require()
If the module can not be found, a MODULE_NOT_FOUND error is thrown.
MODULE_NOT_FOUND
The module path to resolve.
Optional
v0.3.0
Returns an array containing the paths searched during resolution of request or null if the request string references a core module, for example http or fs.
request
null
http
fs
The module path whose lookup paths are being retrieved.
v8.9.0
Use the internal
require()
machinery to look up the location of a module, but rather than loading the module, just return the resolved filename.If the module can not be found, a
MODULE_NOT_FOUND
error is thrown.