Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] #300

Open
popecj29 opened this issue Jul 28, 2023 · 4 comments
Open

[BUG] #300

popecj29 opened this issue Jul 28, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@popecj29
Copy link

Action config

Error message

Run npm run build

[email protected] build
ng build

sh: 1: ng: not found
Error: Process completed with exit code 127.

Expected behavior

it should deploy to my firebase hosting and update the app with the new content.

Actual behavior

the action bombs out and says it can't find angular see above.

@popecj29 popecj29 added the bug Something isn't working label Jul 28, 2023
@popecj29
Copy link
Author

popecj29 commented Aug 3, 2023

This is the whole error log

Run npm i & npm run build

[email protected] build
ng build

sh: 1: ng: not found
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @angular/[email protected].4
npm ERR! Found: @angular/common@15.2.5
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"^15.2.0" from the root project
npm ERR! peer @angular/common@"15.2.5" from @angular/[email protected]
npm ERR! node_modules/@angular/forms
npm ERR! @angular/forms@"^15.2.0" from the root project
npm ERR! peer @angular/forms@"^15.0.0" from @ng-bootstrap/[email protected]
npm ERR! node_modules/@ng-bootstrap/ng-bootstrap
npm ERR! @ng-bootstrap/ng-bootstrap@"^14.1.0" from the root project
npm ERR! 4 more (@angular/platform-browser, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^12.0.0" from @angular/fire@7.0.4
npm ERR! node_modules/@angular/fire
npm ERR! @angular/fire@"^7.0.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR! peer @angular/common@"^12.0.0" from @angular/[email protected]
npm ERR! node_modules/@angular/fire
npm ERR! @angular/fire@"^7.0.4" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /home/runner/.npm/_logs/2023-07-28T02_22_41_480Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/runner/.npm/_logs/2023-07-28T02_22_41_480Z-debug-0.log
Error: Process completed with exit code 127.

@popecj29
Copy link
Author

popecj29 commented Aug 3, 2023

this is the workflow file that was generated by firebase, i did not alter it from its default

This file was auto-generated by the Firebase CLI

https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm i & npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PAWSH_BEA0A }}'
channelId: live
projectId: pawsh-bea0a

@marijnbos
Copy link

marijnbos commented Aug 3, 2023

Heya, It could be that the GitHub action cannot find the project folder if your file structure is something like this:
|- project folder

to fix this you can add a working directory on the run and an entry point in the with clause. Does this fix the issue on your end?

Here is an example workflow:

# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
'on':
  push:
    branches:
      - main
      - development
jobs:
  build_and_deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: npm ci && npm run build
        working-directory: ./projectname(case sensitive)
      - uses: FirebaseExtended/action-hosting-deploy@v0
        with:
          projectId: ###
          entrypoint: './projectname(possibly case sensitive)'
        env:
            FIREBASE_CLI_EXPERIMENTS: webframeworks <- Also something I needed to add for support of angular

@popecj29
Copy link
Author

popecj29 commented Aug 4, 2023

I'll try it, I will say that this worked just fine with no issues a month or so ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants