Skip to content

fix(dev): drop unneeded cross-env from paseo.json dev scripts#1637

Open
cleiter wants to merge 1 commit into
getpaseo:mainfrom
cleiter:fix/paseo-json-cross-env
Open

fix(dev): drop unneeded cross-env from paseo.json dev scripts#1637
cleiter wants to merge 1 commit into
getpaseo:mainfrom
cleiter:fix/paseo-json-cross-env

Conversation

@cleiter

@cleiter cleiter commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

When running Paseo on the Paseo repo itself, the worktree setup step and the paseo.json service scripts (daemon/app/desktop/ios-simulator) fail with cross-env: command not found unless cross-env is installed globally.

The daemon runs paseo.json commands in a plain shell that doesn't have the project's node_modules/.bin on PATH the way npm run does, so the bare cross-env (a local devDependency) doesn't resolve. It only works when the daemon itself runs from the source checkout, which is why it hasn't come up.

Fix: drop cross-env from these commands and set the env vars inline. cross-env only exists for Windows cmd compatibility, and every one of these commands launches a unix ./scripts/*.sh, so Windows support is already gone here — cross-env wasn't buying anything.

The cross-env dependency stays: it's still used and needed by the npm run scripts in package.json / packages/app / packages/server, where commands run via npm on Windows and invoke cross-platform tools (expo, tsx, node). This change is scoped to paseo.json only — removed cross-env from 5 commands (setup + 4 services), env vars now set inline.

How verified: macOS, with cross-env NOT installed globally. Created a fresh Paseo workspace and confirmed the previously-failing commands now run without cross-env — the env-setting step in worktree setup and the daemon/app service scripts launch fine. Before this change they failed with cross-env: command not found.

Discussed in #contributing: https://discordapp.com/channels/1481169421832814616/1517543045384507412

When running Paseo on the Paseo repo itself, the worktree setup step and the
paseo.json service scripts (daemon/app/desktop/ios-simulator) fail with
"cross-env: command not found" unless cross-env is installed globally. The
daemon runs paseo.json commands in a plain shell without the project's
node_modules/.bin on PATH (unlike npm run), so the bare cross-env (a local
devDependency) does not resolve.

cross-env only exists for Windows cmd compatibility, and every one of these
commands launches a unix ./scripts/*.sh, so it was not buying anything here.
Drop it and set the env vars inline. The cross-env dependency stays -- it is
still used by the npm run scripts where it is actually needed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jun 20, 2026

Copy link
Copy Markdown

Greptile Summary

Removes cross-env from five commands in paseo.json (one setup step + four service scripts) and sets the environment variables inline instead. This fixes a cross-env: command not found failure when the Paseo daemon runs these commands in a plain shell that doesn't have the project's node_modules/.bin on PATH.

  • The inline VAR=value command form is valid for every target shell here; all four service commands invoke Unix shell scripts (./scripts/*.sh), so Windows compatibility via cross-env was already absent.
  • The cross-env devDependency is intentionally preserved for the npm run scripts in package.json / packages/app / packages/server, where it is still needed.

Confidence Score: 5/5

Safe to merge — removes a broken prefix from five config commands and replaces it with the standard shell inline-env form, which works in every Unix shell these scripts target.

The change is minimal and mechanical: cross-env VAR=value cmd → VAR=value cmd. Every modified command invokes a Unix shell script, so inline env assignment is correct and portable. The cross-env dependency is intentionally left in place for the npm scripts that still need it. No logic, types, or other code paths are touched.

No files require special attention.

Important Files Changed

Filename Overview
paseo.json Drops cross-env prefix from five commands; env vars are now set inline. Change is correct for Unix-only shell scripts and fixes a real runtime failure when the daemon lacks node_modules/.bin on PATH.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant Daemon as Paseo Daemon
    participant Shell as Plain Shell (no node_modules/.bin)
    participant Script as ./scripts/*.sh

    Note over Daemon,Shell: Before fix
    Daemon->>Shell: "cross-env VAR=value ./scripts/dev-daemon.sh"
    Shell-->>Daemon: cross-env: command not found

    Note over Daemon,Shell: After fix
    Daemon->>Shell: "VAR=value ./scripts/dev-daemon.sh"
    Shell->>Script: exec ./scripts/dev-daemon.sh
    Script-->>Daemon: runs successfully
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant Daemon as Paseo Daemon
    participant Shell as Plain Shell (no node_modules/.bin)
    participant Script as ./scripts/*.sh

    Note over Daemon,Shell: Before fix
    Daemon->>Shell: "cross-env VAR=value ./scripts/dev-daemon.sh"
    Shell-->>Daemon: cross-env: command not found

    Note over Daemon,Shell: After fix
    Daemon->>Shell: "VAR=value ./scripts/dev-daemon.sh"
    Shell->>Script: exec ./scripts/dev-daemon.sh
    Script-->>Daemon: runs successfully
Loading

Reviews (1): Last reviewed commit: "fix(dev): drop unneeded cross-env from p..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant