Firebase App Hosting : sh: 1: ng: not found

Discussão em 'Angular' iniciado por Simple Dev, Março 12, 2025.

  1. Simple Dev

    Simple Dev Guest

    Environment

    • Angular 19.2.0 Angular workspace mono-repo with 4 Angular projects inside
    • Using Ionic
    • Using SSR for two projects
    • Attempting to deploy a project named "organizer" (using SSR) from my Angular workspace (and then the others)
    • I want to use Firebase App Hosting (different from Firebase Hosting).
    • I have followed the official documentation link.

    My Angular workspace has a main package.json. All my projects have their own package.json.

    Inside the package.json of the "organizer" project, I have the following scripts:

    "scripts": {
    "start": "ionic serve",
    "build": "ng build"
    },


    When I commit my modifications to the main branch, a Firebase App Hosting deployment is triggered. When I go to "View Cloud Build logs," I see this log error:

    Installing application dependencies.
    --------------------------------------------------------------------------------
    Running "npm ci --quiet --no-fund --no-audit (NODE_ENV=development)"
    added 4 packages in 756ms
    Done "npm ci --quiet --no-fund --no-audit (NODE_ENV=development)" (858.107321ms)
    --------------------------------------------------------------------------------
    Running "npm run build"
    > organizer@0.0.1 build
    > ng build
    sh: 1: ng: not found
    Done "npm run build" (192.475112ms)
    --------------------------------------------------------------------------------
    failed to build: (error ID: 1a2262f3):
    > organizer@0.0.1 build
    > ng build
    sh: 1: ng: not found
    NOTE: Running the default build script can be skipped by passing the empty environment variable "GOOGLE_NODE_RUN_SCRIPTS=" to the build
    ERROR: failed to build: exit status 1
    ERROR: failed to build: executing lifecycle: failed with status code: 51


    I don't know what to do and I don't find many resources on the subject.

    Continue reading...

Compartilhe esta Página