- 返回: <string>
request<string> The module path to resolve.
paths<string> Paths to resolve module location from. If present, these paths are used instead of the default resolution paths, with the exception of GLOBAL_FOLDERS like
$HOME/.node_modules, which are always included. Each of these paths is used as a starting point for the module resolution algorithm, meaning that the
node_moduleshierarchy is checked from this location.
- Returns: <string>
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.