FirebaseExtended / action-hosting-deploy

Automatically deploy shareable previews for your Firebase Hosting sites
https://firebase.google.com/docs/hosting/github-integration
Apache License 2.0
695 stars 202 forks source link

[BUG] The process '/usr/local/bin/npx' failed with exit code 1 #277

Open yamankatby opened 1 year ago

yamankatby commented 1 year ago

I'm getting this error in the Deploying to production site group

Action config

"on":
  push:
    branches:
      - yaman/workflow

jobs:
  build_and_preview:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: yarn install --frozen-lockfile && yarn run build-storybook
      - uses: FirebaseExtended/action-hosting-deploy@v0
        with:
          repoToken: "${{ secrets.GITHUB_TOKEN }}"
          firebaseServiceAccount:
            "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ROWY_TESTING }}"
          projectId: rowy-testing
          channelId: live
          target: rowybook

Error message

  The process '/usr/local/bin/npx' failed with exit code 1
  Error: The process '/usr/local/bin/npx' failed with exit code 1
  ***
    conclusion: 'failure',
    output: ***
      title: 'Deploy preview failed',
      summary: "Error: The process '/usr/local/bin/npx' failed with exit code 1"
    ***
  ***

Expected behavior

Actual behavior

MixMasterT commented 1 year ago

I have been getting this same error.

It looks like the culprit may be that the called action (FirebaseExtended/action-hosting-deploy@v0) doesn't enable webframeworks.

The following error is copied from the build_and_deploy action's output on the step that runs FirebaseExtended/action-hosting-deploy@v0.

Error: Cannot deploy a web framework to hosting because the experiment webframeworks is not enabled. To enable webframeworks run firebase experiments:enable webframeworks
MixMasterT commented 1 year ago

It looks like this works: add

  steps:
    - uses: FirebaseExtended/action-hosting-deploy@v0
       with:
          repoToken: '${{ secrets.GITHUB_TOKEN }}'
          firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_... }'
          ...
       env:
         FIREBASE_CLI_EXPERIMENTS: webframeworks

The last part, adding env with FIREBASE_CLI_EXPERIMENTS is what got me past this error.

Here is a helpful Stack Overflow link.

jeemercado commented 1 year ago

Did you manage to fix this? @yamankatby

hyperlate commented 1 year ago

I now have the same bug but with exit code 2...

Is there any update on the situation or should I open a new issue?

jeemercado commented 1 year ago

I now have the same bug but with exit code 2...

Is there any update on the situation or should I open a new issue?

Add a firebaseToolsVersion: specify what tool version to use

odwrotnie commented 11 months ago

Which firebaseToolsVersion works?

sankaSanjeeva commented 6 months ago

+1

70Ni commented 11 hours ago

while I change public: public in firebase.json overcome this error stage

firebase.json

{ "hosting": { "public": "public", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ],