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 "anizer" (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 "anizer" 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"
> [email protected] build
> ng build
sh: 1: ng: not found
Done "npm run build" (192.475112ms)
--------------------------------------------------------------------------------
failed to build: (error ID: 1a2262f3):
> [email protected] 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
EDIT : I have tried to update the package.json script with
"build": "npx ng build"
The log error is now :
Running "npm run build"
> [email protected] build
> npx ng build
npm error could not determine executable to run
npm error A complete log of this run can be found in: /home/cnb/.npm/_logs/2025-03-12T12_06_36_944Z-debug-0.log
Done "npm run build" (896.994704ms)
--------------------------------------------------------------------------------
failed to build: (error ID: 1a2262f3):
> [email protected] build
> npx ng build
npm error could not determine executable to run
I also tried npx run build
and npx ng build
without success (same error log).
I don't know what to do and I don't find many resources on the subject.