#[non_exhaustive]pub enum ResolveError {
Show 20 variants
Ignored(PathBuf),
NotFound(String),
MatchedAliasNotFound(String, String),
TsconfigNotFound(PathBuf),
TsconfigSelfReference(PathBuf),
IOError(IOError),
Builtin {
resolved: String,
is_runtime_module: bool,
},
ExtensionAlias(String, String, PathBuf),
Specifier(SpecifierError),
JSON(JSONError),
Restriction(PathBuf, PathBuf),
InvalidModuleSpecifier(String, PathBuf),
InvalidPackageTarget(String, String, PathBuf),
PackagePathNotExported(String, PathBuf),
InvalidPackageConfig(PathBuf),
InvalidPackageConfigDefault(PathBuf),
InvalidPackageConfigDirectory(PathBuf),
PackageImportNotDefined(String, PathBuf),
Unimplemented(&'static str),
Recursion,
}Expand description
All resolution errors
thiserror is used to display meaningful error messages.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ignored(PathBuf)
Ignored path
Derived from ignored path (false value) from browser field in package.json
{
"browser": {
"./module": false
}
}See https://github.com/defunctzombie/package-browser-field-spec#ignore-a-module
NotFound(String)
Module not found
MatchedAliasNotFound(String, String)
Matched alias value not found
TsconfigNotFound(PathBuf)
Tsconfig not found
TsconfigSelfReference(PathBuf)
Tsconfig’s project reference path points to it self
IOError(IOError)
Builtin
Node.js builtin module when Options::builtin_modules is enabled.
is_runtime_module can be used to determine whether the request
was prefixed with node: or not.
resolved is always prefixed with “node:” in compliance with the ESM specification.
ExtensionAlias(String, String, PathBuf)
All of the aliased extension are not found
Displays Cannot resolve 'index.mjs' with extension aliases 'index.mts' in ...
Specifier(SpecifierError)
The provided path specifier cannot be parsed
JSON(JSONError)
JSON parse error
Restriction(PathBuf, PathBuf)
Restricted by ResolveOptions::restrictions
InvalidModuleSpecifier(String, PathBuf)
InvalidPackageTarget(String, String, PathBuf)
PackagePathNotExported(String, PathBuf)
InvalidPackageConfig(PathBuf)
InvalidPackageConfigDefault(PathBuf)
InvalidPackageConfigDirectory(PathBuf)
PackageImportNotDefined(String, PathBuf)
Unimplemented(&'static str)
Recursion
Occurs when alias paths reference each other.
Implementations§
Trait Implementations§
Source§impl Clone for ResolveError
impl Clone for ResolveError
Source§fn clone(&self) -> ResolveError
fn clone(&self) -> ResolveError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more