jdx/mise · error
mise link only supports concrete versions and refs, not {}
Error message
mise link only supports concrete versions and refs, not {} What it means
`mise link` creates a symlink from mise's installs directory to an existing tool installation, and can only name the link by a concrete version or a ref. The first guard (link.rs:38) rejects any ToolRequest that is neither `Version` nor `Ref` — e.g. `path:`, `system`, or prefix requests — because there is no stable pathname to link under.
Source
Thrown at src/cli/link.rs:38
/// Tool name and version to create a symlink for
#[clap(value_name = "TOOL@VERSION")]
tool: ToolArg,
/// The local path to the tool version
/// e.g.: ~/.nvm/versions/node/v20.0.0
#[clap(value_hint = ValueHint::DirPath, verbatim_doc_comment)]
path: PathBuf,
/// Overwrite an existing tool version if it exists
#[clap(long, short = 'f')]
force: bool,
}
impl Link {
pub async fn run(self) -> Result<()> {
let tvr = match self.tool.tvr.as_ref() {
Some(tvr @ (ToolRequest::Version { .. } | ToolRequest::Ref { .. })) => tvr,
Some(tvr) => bail!(
"mise link only supports concrete versions and refs, not {}",
tvr.version()
),
None => bail!("must provide a version for {}", self.tool.style()),
};
let config = Config::get().await?;
let version_pathname = match tvr {
ToolRequest::Version { version, .. } => {
let backend = tvr.backend()?;
let resolved_alias = config.resolve_alias(&backend, version).await?;
if version == "latest"
|| resolved_alias != *version
|| backend.is_rolling_channel(version)
{
bail!(
"mise link only supports concrete versions and refs, not {}",
tvr.version()
);View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Provide a concrete version: `mise link node@22.17.1 ~/.tools/node-v22.17.1`
- Or a ref: `mise link node@ref:main ~/.tools/node-main`
- For versionless aliases, resolve the version first (`mise latest node`) and link that
Example fix
# before mise link node@system /usr # after mise link node@22.17.1 ~/.tools/node-v22.17.1
Defensive patterns
Strategy: validation
Validate before calling
#!/usr/bin/env bash
req=$1 # expect TOOL@VERSION
ver=${req#*@}
case "$ver" in
"$req"|""|path:*|system|ref:*|*.x)
echo "mise link needs a concrete version, e.g. ${req%%@*}@22.17.1" >&2; exit 2 ;;
esac
mise link "$req" "$path" Try / catch
mise link "$tool@$ver" "$path" 2>err.log || { grep -q 'only supports concrete versions' err.log && mise link "$tool@$(mise latest "$tool")" "$path"; } Prevention
- Resolve moving specifiers to concrete versions before linking
- Treat link as an explicit-version-only command in scripts
When it happens
Trigger: `mise link node@path:/opt/node ~/.tools/node` or `mise link node@20.x ...`; anything where the TOOL@VERSION arg parses into a non-concrete request variant.
Common situations: Copy-pasting a version string that works in mise.toml into `mise link`; linking system-managed tools, which link does not support.
Related errors
- invalid version: {}
- must provide a version for {}
- cannot link {} to its own install path
- invalid prefix: {}
- No config file found in current directory
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/5f60b9aca66f9c4e.
Report an issue: GitHub.