firebase / firebase-tools

The Firebase Command Line Tools
MIT License
4.04k stars 954 forks source link

Firebase Deploy Functions Failed (Linux): libc.so.6, GLIBC_2.28, required by node (maybe a more helpful error message?) #5085

Closed psygo closed 1 year ago

psygo commented 2 years ago

This was originally posted on StackOverflow.

I'm trying to deploy a function which is working locally with the emulators, but, when trying to deploy, give me this:

i  functions: creating Node.js 16 function <function-name>(us-central1)...
Build failed: node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28'
not found (required by node); Error ID: 653c7ba4

Functions deploy had errors with the following functions:
        <function-name>(us-central1)
i  functions: cleaning up build files...

Error: There was an error deploying functions

What I've tried so far:

  1. Downgrade my Node version from 18 to 16.

    Yes, I do have this in my package.json:

    "engines": {
      "node": "16"
    },
  2. Rebuild everything from scratch with Node 16.

I think libc.so.6 is related to Java, but I don't know how that helps. Here is my java --version:

java 19 2022-09-20
Java(TM) SE Runtime Environment (build 19+36-2238)
Java HotSpot(TM) 64-Bit Server VM (build 19+36-2238, mixed mode, sharing)

I'm using Archcraft, a distro based on Arch Linux.

I've just realized that I can share my whole repo, since it's an open source project. Here it is.

A related issue.

google-oss-bot commented 2 years ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

psygo commented 2 years ago

Apparently, my mistake was that my node version in package.json was actually 18.x.x, and now that I went back to a 16.x.x, everything seems to work fine — I was confused because my global node is 16.x.x. That error message really doesn't help though...

Also, I don't know why but deploying defaults to US even though I'm registered as southamerica-east1, but that's another issue entirely...

hsubox76 commented 2 years ago

Hi, looks like this is an issue about deploying Firebase Functions using the CLI so I think the repo you are looking for is firebase-tools which is the code for the CLI. I can transfer this issue.

benboughton1 commented 1 year ago

I have the same issue even after adjusting package.json node version to 16.

kyduff commented 1 year ago

I have the same issue even after adjusting package.json node version to 16.

I also have this issue. @psygo Can you clarify what you mean when you said you changed your node version to 16.x.x? Hadn't you already tried changing engines.node to 16?

russellwheatley commented 1 year ago

I would also add that your nodejs version in your firebase.json overrides the nodejs version set in your package.json as described here: https://firebase.google.com/docs/functions/manage-functions?gen=2nd#set_nodejs_version

Seems like your issue is now resolved, @psygo?

google-oss-bot commented 1 year ago

Hey @psygo. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 1 year ago

Since there haven't been any recent updates here, I am going to close this issue.

@psygo if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.