angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

spawn gcloud ENOENT

Open ibrahimxcool opened this issue 3 years ago • 4 comments
trafficstars

Version info

Angular: 12.2.15

Firebase: 9.4.0

AngularFire: 7.2.0

nguniversal/express-engine: 12.1.3

Problem

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

{
  "name": "functions",
  "description": "Angular Universal Application",
  "main": "dist\\my-project\\server\\main.js",
  "scripts": {
    "start": "node dist\\my-project\\server\\main.js"
  },
  "engines": {
    "node": "16.13"
  },
  "dependencies": {},
  "devDependencies": {},
  "private": true
}

Where it should be a single slash \ instead of a double slashes \\

ibrahimxcool avatar Dec 21 '21 18:12 ibrahimxcool

This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Dec 21 '21 18:12 google-oss-bot

@ibrahimxcool How did you end up resolving this issue?

vladimir-barsuchenko avatar Feb 21 '22 14:02 vladimir-barsuchenko

Same problem here on Windows.

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...

fr-esco avatar Mar 10 '22 10:03 fr-esco

Same here

DavidWeiss2 avatar Mar 21 '22 12:03 DavidWeiss2

Just created a PR with a fix for Windows users.

fr-esco avatar Oct 07 '22 13:10 fr-esco