You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On installing Angular fire with ng add @angular/fire and choosing Cloud Run for my SSR. It gives me an error when running ng deploy .
✔ Prerendering routes to C:\Users\x\Desktop\my-project\dist\my-project\browser complete.
📦 Deploying to Cloud Run Error when trying to deploy: spawn gcloud ENOENT
Where I think the problem lies is at dist/my-project/run/package.json
I put gcloud in the Path variable and logged in. Then made sure that gcloud works if called from PowerShell, Command line and Git bash. Bt it still seems unavailable to this schematic run process...
I found a similar historical Windows issue in AngularFire where spawn gcloud ENOENT was not caused by gcloud being missing, but by Windows child-process/env handling. That thread included a later fix described as “give child processes proper access to env.”
My repro looks similar:
gcloud version works in PowerShell
where.exe gcloud finds the binary
Node spawn('gcloud', ...) fails with ENOENT
Node spawn('gcloud.cmd', ..., { shell: true }) works
This suggests the OpenClaw Windows path may need different child_process handling for gcloud.
Reopening this: #3274 fixed only half of what was reported here.
The backslash paths in the generated Cloud Run package.json are fixed.
The spawn gcloud ENOENT half is not: the deploy schematic still launches gcloud with plain child_process.spawn, which on Windows does not resolve the gcloud.cmd shim. The repro posted above matches this.
The fix on our side is to run those gcloud calls through cross-spawn, the way the schematic's package-manager commands already run, and it is queued.
Activity
google-oss-bot commentedon Dec 21, 2021
This issue does not seem to follow the issue template. Make sure you provide all the required information.
vladimir-barsuchenko commentedon Feb 21, 2022
@ibrahimxcool How did you end up resolving this issue?
fr-esco commentedon Mar 10, 2022
Same problem here on Windows.
I put
gcloudin thePathvariable and logged in. Then made sure thatgcloudworks if called from PowerShell, Command line and Git bash. Bt it still seems unavailable to this schematic run process...DavidWeiss2 commentedon Mar 21, 2022
Same here
fix(schematics): deploy - give child processes proper access to env v…
fix(schematics): deploy - fix path to main.js (angular#3098)
fr-esco commentedon Oct 7, 2022
Just created a PR with a fix for Windows users.
walterjjoyce commentedon Mar 15, 2026
I found a similar historical Windows issue in AngularFire where
spawn gcloud ENOENTwas not caused by gcloud being missing, but by Windows child-process/env handling. That thread included a later fix described as “give child processes proper access to env.”My repro looks similar:
gcloud versionworks in PowerShellwhere.exe gcloudfinds the binaryspawn('gcloud', ...)fails with ENOENTspawn('gcloud.cmd', ..., { shell: true })worksThis suggests the OpenClaw Windows path may need different child_process handling for gcloud.
armando-navarro commentedon Aug 18, 2026
Reopening this: #3274 fixed only half of what was reported here.
package.jsonare fixed.spawn gcloud ENOENThalf is not: the deploy schematic still launches gcloud with plainchild_process.spawn, which on Windows does not resolve thegcloud.cmdshim. The repro posted above matches this.The fix on our side is to run those gcloud calls through
cross-spawn, the way the schematic's package-manager commands already run, and it is queued.fix(schematics): use a POSIX path for the Cloud Run main.js entry (an…
fix(schematics): use a POSIX path for the Cloud Run main.js entry (#3274