gleam-lang/gleam · error
Failed to determine user cache directory
Error message
Failed to determine user cache directory
What it means
Error "Failed to determine user cache directory" thrown in gleam-lang/gleam.
Source
Thrown at compiler-core/src/paths.rs:182
global_hexpm_cache().join("credentials.toml")
}
pub fn global_hexpm_legacy_credentials_path() -> Utf8PathBuf {
global_hexpm_cache().join("credentials")
}
fn global_hexpm_cache() -> Utf8PathBuf {
default_global_gleam_cache().join("hex").join("hexpm")
}
fn global_packages_cache() -> Utf8PathBuf {
global_hexpm_cache().join("packages")
}
pub fn default_global_gleam_cache() -> Utf8PathBuf {
Utf8PathBuf::from_path_buf(
dirs_next::cache_dir()
.expect("Failed to determine user cache directory")
.join("gleam"),
)
.expect("Non Utf8 Path")
}
pub fn unnest(within: &Utf8Path) -> Utf8PathBuf {
let mut path = Utf8PathBuf::new();
for _ in within {
path = path.join("..");
}
path
}
#[test]
fn paths() {
assert!(default_global_gleam_cache().ends_with("gleam"));
assert!(global_packages_cache().ends_with("hex/hexpm/packages"));View on GitHub (pinned to 7e623aa83d)
When it happens
Trigger: Thrown at compiler-core/src/paths.rs:182 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gleam-lang/gleam@7e623aa83d (2026-08-17).
Data as JSON: /api/errors/3fdcbedf884f34a0.
Report an issue: GitHub.