Fix Node.js Error: version \`GLIBC_2.28' not found

Issue

During a Node.js build, the following error occurs:

node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)

Resolution

This error occurs when the selected Node.js version does not support the underlying operating system's libc6 package. This error is known to occur with Node.js versions 18 or greater when running on the heroku-18 stack.

To solve this issue, there are two options.

  1. Update the app to a stack that is compatible with the Node.js version:
heroku stack:set heroku-20
  1. Pin to a Node.js version compatible with the current stack in your package.json:
{
  "engines": {
    "node": "16.x"
  }
}

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support