pub(crate) enum NpmError {
MissingRegistry {
unit: String,
},
MissingPackage(String),
RegistryWithoutHost {
url: String,
},
MissingToken,
Npmrc(Error),
Spawn {
arguments: Vec<String>,
source: Error,
},
Failed {
arguments: Vec<String>,
stderr: String,
},
Registry(PackageFailure),
}Expand description
An npm command or registry failure.
Variants§
MissingRegistry
A unit publishes but no npm registry is configured.
MissingPackage(String)
A resolved unit lacks its npm package name.
RegistryWithoutHost
The registry URL has no host to authenticate against.
MissingToken
The publisher was built without a credential.
Npmrc(Error)
The temporary npm configuration cannot be written.
Spawn
npm could not be started.
Failed
npm exited unsuccessfully.
Registry(PackageFailure)
The registry could not say whether a version exists.
Trait Implementations§
Source§impl Error for NpmError
impl Error for NpmError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<NpmError> for ResolveError
impl From<NpmError> for ResolveError
Source§impl From<PackageFailure> for NpmError
impl From<PackageFailure> for NpmError
Source§fn from(source: PackageFailure) -> Self
fn from(source: PackageFailure) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for NpmError
impl !UnwindSafe for NpmError
impl Freeze for NpmError
impl Send for NpmError
impl Sync for NpmError
impl Unpin for NpmError
impl UnsafeUnpin for NpmError
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
Mutably borrows from an owned value. Read more