← Back to PRs

#11951: Prepending Windows Node to PATH didn’t help

by tranhoangtu-it open 2026-02-08 16:06 View on GitHub →
scripts size: S
Cause: Prepending Windows Node to PATH didn’t help because the Windows pnpm binary (the script at /mnt/c/.../pnpm) is executed by the same shell and does exec node; in that context node still wasn’t found (e.g. WSL vs. Windows path or exec behavior). Fix: The script no longer uses pnpm for the steps that need Node. It runs: 1. tsc as: "$NODE" node_modules/typescript/bin/tsc -p vendor/a2ui/renderers/lit/tsconfig.json 2. rolldown as: "$NODE" node_modules/rolldown/bin/cli.mjs -c apps/shared/OpenClawKit/Tools/CanvasA2UI/rolldown.config.mjs So: - The same $NODE used for the hash step is used for tsc and rolldown (no pnpm exec). - Only relative paths are passed, so Windows Node always resolves them from the repo root and path-style issues are avoided. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates `scripts/bundle-a2ui.sh` to resolve a usable `node` executable across environments (including Git Bash/WSL) and to avoid invoking Node via `pnpm exec`. It also changes the hashing and build steps to use `$NODE` directly and to pass only relative paths to TypeScript/Rolldown to avoid Unix-path issues with Windows Node. The main functional risk is that the script now relies on the caller’s current working directory for both hashing (`process.cwd()`) and the `tsc`/`rolldown` invocations (relative paths). If the script is invoked from outside the repo root (e.g., `~/bin/bundle-a2ui.sh`), it can fail or compute an incorrect hash unless it `cd`s to `$ROOT_DIR` (or uses absolute paths). <h3>Confidence Score: 3/5</h3> - This PR is mergeable after fixing a working-directory bug that can break bundling/hashing when invoked outside the repo root. - The change is localized to a shell script and the intent is clear, but the switch to `process.cwd()` plus relative config paths will definitely fail or mis-hash when the script isn’t run from the repo root. Fixing this (e.g., `cd $ROOT_DIR`) should make the change low risk. - scripts/bundle-a2ui.sh <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs