#[non_exhaustive]pub enum ResolveError {
Show 20 variants
Ignored(PathBuf),
NotFound(String),
MatchedAliasNotFound(String, String),
TsconfigNotFound(PathBuf),
TsconfigSelfReference(PathBuf),
IOError(IOError),
Builtin(String),
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(String)
Node.js builtin modules
This is an error due to not being a Node.js runtime.
The alias option can be used to resolve a builtin module to a polyfill.
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 moresource§impl Debug for ResolveError
impl Debug for ResolveError
source§impl Display for ResolveError
impl Display for ResolveError
source§impl Error for ResolveError
impl Error for ResolveError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<Error> for ResolveError
impl From<Error> for ResolveError
source§impl PartialEq for ResolveError
impl PartialEq for ResolveError
impl StructuralPartialEq for ResolveError
Auto Trait Implementations§
impl Freeze for ResolveError
impl !RefUnwindSafe for ResolveError
impl Send for ResolveError
impl Sync for ResolveError
impl Unpin for ResolveError
impl !UnwindSafe for ResolveError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)