fix(dev): spawn turbo via shell so pnpm dev works on Windows#5
Open
scommisso wants to merge 1 commit into
Open
fix(dev): spawn turbo via shell so pnpm dev works on Windows#5scommisso wants to merge 1 commit into
pnpm dev works on Windows#5scommisso wants to merge 1 commit into
Conversation
scripts/dev.mjs spawned `turbo` with a bare command name + args array. On Windows, Node's spawn cannot exec the `turbo.cmd` shim by name, so `pnpm dev` crashed with `spawn turbo ENOENT`. Use shell:true and pass the command as a single string (the single-string form avoids Node's DEP0190 args+shell warning; the arguments are static, so there is no injection risk). Also document in .env.example that under turbo the web task runs with cwd=web/, so a relative ENGY_DIR resolves against web/ rather than the repo root -- an absolute path is needed to share one dev data store. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
scommisso
marked this pull request as ready for review
July 2, 2026 16:25
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
Fixes
pnpm devon Windows, which currently crashes on startup:scripts/dev.mjsspawnsturbowith a bare command name and an args array. On Windows theturbobinary is aturbo.cmdshim, which Node'sspawncannot exec by name without a shell, so it throwsENOENTandpnpm devdies.Why this fix
shell: trueso Windows resolves the.cmdshim (POSIX still works via/bin/sh).'turbo run dev') rather than an args array. Undershell: truean args array triggers Node'sDEP0190warning; the single-string form avoids it, and the arguments are static so there is no injection risk.Also adds a note to
.env.example: under turbo the web task runs withcwd=web/, so a relativeENGY_DIRresolves againstweb/(e.g.web/.dev-engy/) rather than the repo root. Use an absolute path to point both web and client at one shared dev data store (otherwise the dev DB silently splits).Validation
pnpm devnow starts cleanly on Windows 11 (Node v24):turbo 2.8.12spawns, noENOENT, noDEP0190warning, web + client come up and serve requests.node --check scripts/dev.mjspasses.pnpm bltsuite was not run.Notes for reviewer
eslint scripts/dev.mjsreportsno-undefforprocess/consolebecause no Node globals are configured for thescripts/dir. Out of scope; happy to add an eslint override in a follow-up.🤖 Generated with Claude Code