vs-shell-format icon indicating copy to clipboard operation
vs-shell-format copied to clipboard

No formatter for `shell-script` files installed on v7.2.8

Open ethanmusser opened this issue 4 months ago • 6 comments

Type: Bug

Whenever I try to format a document with v7.2.8 I see the following error pop-up despite having shell-format configured as the default formatter for shell-script files and having shfmt installed on my system.

There is no formatter for "shell-script" files installed.

Reverting to v7.2.5 fixes this issue.

Seems related to #396, #401.

Extension version: 7.2.8 VS Code version: Code 1.104.0 (f220831ea2d946c0dcb0f3eaa480eb435a2c1260, 2025-09-10T06:46:18.035Z) OS version: Linux x64 6.14.0-29-generic Modes:

System Info
Item Value
CPUs AMD Ryzen 7 9800X3D 8-Core Processor (16 x 5255)
GPU Status 2d_canvas: enabled
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
Load (avg) 0, 0, 0
Memory (System) 60.39GB (49.98GB free)
Process Argv . --crash-reporter-id 798a2e4f-c21b-4085-9282-55c61b3ed42d
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368cf:30146710
pythonvspyt551cf:31249601
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
996jf627:31283433
pythonrdcb7:31342333
usemplatestapi:31297334
aj953862:31281341
nesew2to5:31336538
agentclaude:31374413
nes-set-on:31340697
testaa123cf:31335227
onetestforazureexpcf:31335614
63221493:31336333
0927b901:31350571
ovs_c:31383294
0cj2b977:31352657
cloudbuttont:31379625
todos-1:31384886
3efgi100_wstrepl:31382709
trigger-command-fix:31379601
auto_model_enabled:31385282
copilot-gpt-5-mini:31386632

ethanmusser avatar Sep 16 '25 18:09 ethanmusser

duplicate with #396 downgrade to 7.2.5

s1ro6 avatar Sep 18 '25 10:09 s1ro6

duplicate with #396 downgrade to 7.2.5

Already noted that. Just thought it might be useful to have my system/VSCode information for debugging purposes.

ethanmusser avatar Sep 18 '25 16:09 ethanmusser

It's the same in vs code also with 7.2.5

raduhz avatar Oct 09 '25 14:10 raduhz

Until @foxundermoon fixes the issue, if you're using devcontainers, then you can pin the extension version:

{
	"customizations": {
		"vscode": {
			"extensions": [
				"[email protected]"
			]
		}
	}
}

jpickwell avatar Oct 09 '25 20:10 jpickwell

Here's the stack from Extension Host logs in VS Code

2025-10-10 11:43:33.751 [error] Activating extension foxundermoon.shell-format failed due to an error:
2025-10-10 11:43:33.751 [error] Error: ENOENT: no such file or directory, open '{path}\.vscode\extensions\foxundermoon.shell-format-7.2.8\dist\one_ini_bg.wasm'
    at Object.openSync (node:fs:562:18)
    at Object.func [as openSync] (node:electron/js2c/node_init:2:2617)
    at Object.readFileSync (node:fs:446:35)
    at Object.t.readFileSync (node:electron/js2c/node_init:2:11013)
    at Object.7959 ({path}\.vscode\extensions\foxundermoon.shell-format-7.2.8\dist\extension.js:1:3878)
    at n ({path}\.vscode\extensions\foxundermoon.shell-format-7.2.8\dist\extension.js:1:99225)
    at Object.7753 ({path}\.vscode\extensions\foxundermoon.shell-format-7.2.8\dist\extension.js:1:26623)
    at n ({path}\.vscode\extensions\foxundermoon.shell-format-7.2.8\dist\extension.js:1:99225)
    at Object.6549 ({path}\.vscode\extensions\foxundermoon.shell-format-7.2.8\dist\extension.js:1:68340)
    at n ({path}\.vscode\extensions\foxundermoon.shell-format-7.2.8\dist\extension.js:1:99225)
    at Object.112 ({path}\.vscode\extensions\foxundermoon.shell-format-7.2.8\dist\extension.js:1:66299)
    at n ({path}\.vscode\extensions\foxundermoon.shell-format-7.2.8\dist\extension.js:1:99225)
    at {path}\.vscode\extensions\foxundermoon.shell-format-7.2.8\dist\extension.js:1:99265
    at Object.<anonymous> ({path}\.vscode\extensions\foxundermoon.shell-format-7.2.8\dist\extension.js:1:99289)
    at Module._compile (node:internal/modules/cjs/loader:1696:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1829:10)
    at Module.load (node:internal/modules/cjs/loader:1430:32)
    at Module._load (node:internal/modules/cjs/loader:1253:12)
    at Module.c._load (node:electron/js2c/node_init:2:17993)
    at Module.e._load (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:391:5984)
    at Module.t._load (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:209:22649)
    at Module.r._load (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:201:25551)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:242:24)
    at Module.require (node:internal/modules/cjs/loader:1452:12)
    at Module.<anonymous> ({path}\.vscode\extensions\github.copilot-chat-0.31.5\dist\extension.js:81:36096)
    at Module.Hook._require.Module.require ({path}\.vscode\extensions\azurite.azurite-3.35.0\node_modules\require-in-the-middle\index.js:188:39)
    at require (node:internal/modules/helpers:135:16)
    at aJ.Cb (file:///c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:240:1253)

Cam-Borrowell avatar Oct 10 '25 15:10 Cam-Borrowell

import { mkdir, copyFile } from "node:fs/promises";
import { join, dirname } from "node:path";
import { fileURLToPath } from "node:url";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const repoRoot = join(__dirname, "..");

const source = join(repoRoot, "node_modules", "@one-ini", "wasm", "one_ini_bg.wasm");
const targetDir = join(repoRoot, "dist");
const target = join(targetDir, "one_ini_bg.wasm");

try {
  await mkdir(targetDir, { recursive: true });
  await copyFile(source, target);
  console.log(`[copy-assets] Copied ${source} → ${target}`);
} catch (error) {
  console.error("[copy-assets] Failed to copy one_ini_bg.wasm:", error);
  process.exitCode = 1;
}

The solution I came up with was to create a script that includes the file in dist. I encountered the same error while merging the two repositories to have formatter, linter, and language in a single repo, since I don't like having many extensions for the same thing, in addition to updating and modernizing the code.

"postbuild": "node scripts/copy-assets.mjs",

Aesthermortis avatar Oct 20 '25 23:10 Aesthermortis