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] firebase-tools@13 (latest) now requires Node 18 or Node 20 #326

Open
al-the-x opened this issue Dec 6, 2023 · 5 comments
Open

[BUG] firebase-tools@13 (latest) now requires Node 18 or Node 20 #326

al-the-x opened this issue Dec 6, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@al-the-x
Copy link

al-the-x commented Dec 6, 2023

Action config

- uses: FirebaseExtended/action-hosting-deploy@v0
  with:
    repoToken: "${{ secrets.GITHUB_TOKEN }}"
    firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
    expires: 30d
    projectId: my-awesome-project

Error message

  npm WARN exec The following package was not found and will be installed: firebase-tools@13.0.0
  npm WARN EBADENGINE Unsupported engine ***
  npm WARN EBADENGINE   package: 'firebase-tools@13.0.0',
  npm WARN EBADENGINE   required: *** node: '>=18.0.0 || >=20.0.0' ***,
  npm WARN EBADENGINE   current: *** node: 'v16.20.2', npm: '8.19.4' ***
  npm WARN EBADENGINE ***
  Firebase CLI v13.0.0 is incompatible with Node.js v16.20.2 Please upgrade Node.js to version >=18.0.0 || >=20.0.0
  
  The process '/opt/hostedtoolcache/node/16.20.2/x64/bin/npx' failed with exit code 1
  Retrying deploy with the --debug flag for better error output
  /opt/hostedtoolcache/node/16.20.2/x64/bin/npx firebase-tools@latest hosting:channel:deploy pr2676-RR-11[42](https://github.com/RentRedi/RRWebApp/actions/runs/7119978382/job/19386237552#step:5:45)8 --expires 5d --project rrdevenvironment --debug
  Firebase CLI v13.0.0 is incompatible with Node.js v16.20.2 Please upgrade Node.js to version >=18.0.0 || >=20.0.0
  
  The process '/opt/hostedtoolcache/node/16.20.2/x64/bin/npx' failed with exit code 1
  Error: The process '/opt/hostedtoolcache/node/16.20.2/x64/bin/npx' failed with exit code 1

Expected behavior

Deployment step succeeds.

Actual behavior

Deployment step fails due to incompatible Node version.

@al-the-x al-the-x added the bug Something isn't working label Dec 6, 2023
@kefniark
Copy link

kefniark commented Dec 7, 2023

I can confirm the same issue here, deployment were still working yesterday and today it fails with same error.

Deploying to Firebase preview channel develop
/opt/hostedtoolcache/node/16.20.2/x64/bin/npx firebase-tools@latest hosting:channel:deploy develop --expires 30d --project **** --json
  npm WARN exec The following package was not found and will be installed: firebase-tools@13.0.0
  npm WARN EBADENGINE Unsupported engine ***
  npm WARN EBADENGINE   package: 'firebase-tools@13.0.0',
  npm WARN EBADENGINE   required: *** node: '>=18.0.0 || >=20.0.0' ***,
  npm WARN EBADENGINE   current: *** node: 'v16.20.2', npm: '8.19.4'***
  npm WARN EBADENGINE ***
  Firebase CLI v13.0.0 is incompatible with Node.js v16.20.2 Please upgrade Node.js to version >=18.0.0 || >=20.0.0  

  The process '/opt/hostedtoolcache/node/16.20.2/x64/bin/npx' failed with exit code 1
  Retrying deploy with the --debug flag for better error output

Until yesterday, the same CI

Deploying to Firebase preview channel develop
/opt/hostedtoolcache/node/16.20.2/x64/bin/npx firebase-tools@latest hosting:channel:deploy develop --expires 30d --project *** --json
  npm WARN exec The following package was not found and will be installed: firebase-tools@12.9.1
  ...
  "status": "success",

So purely based on the log, it looks like it's the firebase-tools update 12.9.1 -> 13.0.0 which cause some issues with this github-action still using node16.

I guess two methods:

  • the easier would be to upgrade this action to node 18 or 20
  • the other would be to pin dependencies major version (for the moment to firebase-tools@12.x), to not run into these kind of issues when dependencies updates with breaking changes. The current npx firebase-tools@latest doesn't look like a good idea

@victorfu
Copy link

victorfu commented Dec 7, 2023

configure this option: https://github.com/FirebaseExtended/action-hosting-deploy#firebasetoolsversion-string

In my case, GitHub Actions workflow works with version 12.9.1 of Firebase Tools for node 16.

@anisabboud
Copy link

Try this in your .yml file to manually select Node 20:

    steps:
      - uses: actions/checkout@v4  # https://github.com/actions/checkout
      - uses: actions/setup-node@v4  # https://github.com/actions/setup-node
        with:
          node-version: 20
      - ...

@tiec7
Copy link

tiec7 commented Jan 30, 2024

I am totally new to firebase, I created a very simple project in vue2, then i followed the instructions on the main site to add firebase with npm install firebase and I got this similar message.
I'm using windows 10 and node 20.10.0.

stuff

May you please help me, suggesting - if available - the simplest steps to make it work? I can't believe firebase is unusable with vue2.

@oyvindwe
Copy link

oyvindwe commented May 31, 2024

May you please help me, suggesting - if available - the simplest steps to make it work? I can't believe firebase is unusable with vue2.

@tiec7 Please don't hijack existing issues with unrelated questions. This question is even not related to this repo, as this repo is for the GitHub action to deploy to Firebase.

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

6 participants