admin管理员组文章数量:1414343
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.
本文标签: angularFirebase App Hostingsh 1 ng not foundStack Overflow
版权声明:本文标题:angular - Firebase App Hosting : sh: 1: ng: not found - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744755967a2623464.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论