pub fn resolve(target: &str) -> Result<PathBuf, ResolutionError>
Expand description
Resolve a node.js module path relative to the current working directory. Returns the absolute path to the module, or an error.
match resolve("./lib") {
Ok(path) => println!("Path is: {:?}", path),
Err(err) => panic!("Failed: {:?}", err),
}