#[non_exhaustive]pub enum ResolveError {
Show 23 variants
Ignored(PathBuf),
NotFound(String),
MatchedAliasNotFound(String, String),
TsconfigNotFound(PathBuf),
TsconfigSelfReference(PathBuf),
TsconfigCircularExtend(CircularPathBufs),
IOError(IOError),
PathNotSupported(PathBuf),
Builtin {
resolved: String,
is_runtime_module: bool,
},
ExtensionAlias(String, String, PathBuf),
Specifier(SpecifierError),
Json(JSONError),
InvalidModuleSpecifier(String, PathBuf),
InvalidPackageTarget(String, String, PathBuf),
PackagePathNotExported(String, PathBuf),
InvalidPackageConfig(PathBuf),
InvalidPackageConfigDefault(PathBuf),
InvalidPackageConfigDirectory(PathBuf),
PackageImportNotDefined(String, PathBuf),
Unimplemented(&'static str),
Recursion,
FailedToFindYarnPnpManifest(PathBuf),
YarnPnpError(Error),
}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
TsconfigCircularExtend(CircularPathBufs)
Occurs when tsconfig extends configs circularly
IOError(IOError)
PathNotSupported(PathBuf)
Indicates the resulting path won’t be able consumable by NodeJS import or require.
For example, DOS device path with Volume GUID (\\?\Volume{...}) is not supported.
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
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.
FailedToFindYarnPnpManifest(PathBuf)
YarnPnpError(Error)
Implementations§
Source§impl ResolveError
impl ResolveError
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