「VSCode」- 常见错汇总

There is no formatter for ‘grafana-alloy’ files installed.

当我们通过 Grafana Alloy 插件格式化文件时,其提示该错误。

# 2025-11-19 Installed with Flatpak,VS Code Version: 1.105.1, Ubuntu 25.10

在 Remote Explorer 中,SSH 连接远程服务器,该功能正常,但是本地无法使用。我们猜测是 Flatpak Sandbox 导致其无法执行 alloy fmt 命令。

Alloy is not installed. Please install it from https://grafana.com/docs/alloy/latest/set-up/install/

我们通过 tar.gz 重新安装 VS Code,问题得以解决。

Alloy is installed: alloy, version v1.11.3 (branch: HEAD, revision: 091a20e)
build user: root@8f09e2ada4ce
build date: 2025-10-27T09:40:09Z
go version: go1.24.6
platform: linux/amd64
tags: netgo,builtinassets,promtail_journal_enabled

https://github.com/grafana/vscode-alloy/issues/7