Windows support for the Remotion workspace: npm, vite and remotion spawns - #20
Open
simplaerai-sv wants to merge 1 commit into
Open
Windows support for the Remotion workspace: npm, vite and remotion spawns#20simplaerai-sv wants to merge 1 commit into
simplaerai-sv wants to merge 1 commit into
Conversation
…awns electron/fragments.ts spawned 'npm', 'sh -c … vite …' and 'npx remotion', all POSIX-only: on Windows npm/npx are .cmd shims (spawn ENOENT, and node refuses .cmd without a shell since CVE-2024-27980), and there is no sh. So the first fragment failed at 'fragment:ensure' and every export with a fragment would have failed at render. win32 branches, POSIX path untouched: - npm install: npm.cmd via shell (constant argv, so a shell is safe) - vite dev server: node node_modules/vite/bin/vite.js, no watchdog — an orphan from a hard exit is adopted by probeExisting() on the next run - remotion render: node node_modules/@remotion/cli/remotion-cli.js — the CLI's JS entry, which also skips npx's startup and network probe Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Remotion fragments (auto-captions, animations) never worked on Windows:
electron/fragments.tsspawnsnpm,sh -c … vite …andnpx remotion,all POSIX-only. One file changed, win32 branches only; the POSIX path —
including the vite watchdog — is untouched.
Symptoms
fragment:ensure→spawn npm ENOENTcontaining a fragment fails at render (
spawn npx ENOENT)On Windows
npm/npxare.cmdshims, whichspawndoes not resolvewithout a shell — and since CVE-2024-27980 node refuses to spawn a
.cmdwithout
shell: trueanyway. There is nosh.Changes
npm.cmdwithshell: true. The argv is a constant(
install --no-audit --no-fund), so a shell is safe here.node node_modules/vite/bin/vite.js --port … --strictPort,no watchdog. An orphan left by a hard exit is tolerated by design:
probeExisting()adopts a server from a previous run instead of fightingit for the port.
node node_modules/@remotion/cli/remotion-cli.js render …,the CLI's own JS entry. Skips npx's startup and its network probe too.
All three use
windowsHide: trueso no console windows flash.Tested
Windows 11, Node 24, remotion 4.0.247, vite 5.4.8, RTX 4060:
rendered (VP9+alpha) and exported through the normal pipeline
userData/fragment-renders) populated as usualRender cost is unchanged from POSIX — Remotion at 60 fps is the slow part
(~4 min per 60-second transparent fragment on this machine), not the spawn.
Sits alongside #7 (embedded Claude on Windows) and #19 (GPU transcription);
no file overlap with either or with #9.
🤖 Generated with Claude Code