Summary
On Windows, a cached task that runs a package binary through the package-manager shim can complete without running the underlying Node CLI.
This appears to be exposed by the Windows .cmd shim to PowerShell .ps1 rewrite added in #345. The repro uses a local package binary and shows that direct Node invocation works while the cached PowerShell shim path does not.
Reproduction
Minimal repro:
https://github.com/SegaraRai/vitetask-repro05
GitHub Actions run showing Linux passing and Windows failing:
https://github.com/SegaraRai/vitetask-repro05/actions/runs/25041476175
The repro defines a local package binary, marker-cli. It does two things:
- prints
MARKER_STDOUT:<label> to stdout
- writes
.markers/<label>.json
This distinguishes stdout capture failures from the CLI not running at all.
The task config is:
export default defineConfig({
run: {
tasks: {
"shim:cached": {
command: "marker-cli shim-cached",
cache: true,
},
"node:cached": {
command: "node ./packages/marker-cli/bin/marker-cli.mjs node-cached",
cache: true,
},
"shim:uncached": {
command: "marker-cli shim-uncached",
cache: false,
},
},
},
});
Manual steps:
vp install
Remove-Item .markers -Recurse -Force -ErrorAction SilentlyContinue
vp cache clean
vp run shim:uncached
Get-Content .markers/shim-uncached.json
Remove-Item .markers -Recurse -Force -ErrorAction SilentlyContinue
vp cache clean
vp run node:cached
Get-Content .markers/node-cached.json
Remove-Item .markers -Recurse -Force -ErrorAction SilentlyContinue
vp cache clean
vp run shim:cached
Get-Content .markers/shim-cached.json
Expected behavior
On Windows, vp run shim:cached should run the package binary and produce both:
MARKER_STDOUT:shim-cached
and:
.markers/shim-cached.json
Actual behavior
On Windows, vp run shim:cached logs the task command:
but does not print:
MARKER_STDOUT:shim-cached
and does not create:
.markers/shim-cached.json
The following control cases both work on Windows:
marker-cli shim-uncached with cache: false
node ./packages/marker-cli/bin/marker-cli.mjs node-cached with cache: true
The same workflow passes on Linux.
Related symptom / search keywords
In the original project where this was first noticed, the same Windows cached package-shim path sometimes opened a new terminal window and showed this process start error:
Error 2147942632 (0x800700e8) occurred while starting "<node.exe>" "<package cli js>"
The localized Windows message looked like:
'"C:\...\node.exe" C:\...\node_modules\.bin/../<package>/bin.js ...' の起動時にエラー 2147942632 (0x800700e8) が発生しました
Search keywords: 2147942632, 0x800700e8, node.exe, node_modules\.bin
Summary
On Windows, a cached task that runs a package binary through the package-manager shim can complete without running the underlying Node CLI.
This appears to be exposed by the Windows
.cmdshim to PowerShell.ps1rewrite added in #345. The repro uses a local package binary and shows that direct Node invocation works while the cached PowerShell shim path does not.Reproduction
Minimal repro:
https://github.com/SegaraRai/vitetask-repro05
GitHub Actions run showing Linux passing and Windows failing:
https://github.com/SegaraRai/vitetask-repro05/actions/runs/25041476175
The repro defines a local package binary,
marker-cli. It does two things:MARKER_STDOUT:<label>to stdout.markers/<label>.jsonThis distinguishes stdout capture failures from the CLI not running at all.
The task config is:
Manual steps:
Expected behavior
On Windows,
vp run shim:cachedshould run the package binary and produce both:and:
Actual behavior
On Windows,
vp run shim:cachedlogs the task command:but does not print:
and does not create:
The following control cases both work on Windows:
marker-cli shim-uncachedwithcache: falsenode ./packages/marker-cli/bin/marker-cli.mjs node-cachedwithcache: trueThe same workflow passes on Linux.
Related symptom / search keywords
In the original project where this was first noticed, the same Windows cached package-shim path sometimes opened a new terminal window and showed this process start error:
The localized Windows message looked like:
Search keywords:
2147942632,0x800700e8,node.exe,node_modules\.bin