Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found

I am trying to deploy a nuxt app (also happens in Nextjs app) using GitHub CI pipeline and I am getting Error: /lib64/libstdc++.so.6: version GLIBCXX_3.4.30’ not found` and

500: INTERNAL_SERVER_ERROR
Code: FUNCTION_INVOCATION_FAILED
ID: bom1::hdzgb-1729258250781-21fd7b2e8f3c.

full error:

Unhandled Rejection: Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /var/task/node_modules/isolated-vm/out/isolated_vm.node)
    at Module._extensions..node (node:internal/modules/cjs/loader:1586:18)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at /opt/rust/nodejs.js:1:11762
    at Function.ar (/opt/rust/nodejs.js:1:12136)
    at e.<computed>.te._load (/opt/rust/nodejs.js:1:11732)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at a (/opt/rust/bytecode.js:1:1094)
    at Object.<anonymous> (/var/task/node_modules/isolated-vm/isolated-vm.js:1:80)
    at Module.<anonymous> (/opt/rust/bytecode.js:1:1435) {
  code: 'ERR_DLOPEN_FAILED'
}
Unhandled Rejection: Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /var/task/node_modules/isolated-vm/out/isolated_vm.node)
    at Module._extensions..node (node:internal/modules/cjs/loader:1586:18)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at /opt/rust/nodejs.js:1:11762
    at Function.ar (/opt/rust/nodejs.js:1:12136)
    at e.<computed>.te._load (/opt/rust/nodejs.js:1:11732)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at a (/opt/rust/bytecode.js:1:1094)
    at Object.<anonymous> (/var/task/node_modules/isolated-vm/isolated-vm.js:1:80)
    at Module.<anonymous> (/opt/rust/bytecode.js:1:1435) {
  code: 'ERR_DLOPEN_FAILED'
}
Node.js process exited with exit status: 128. The logs above can help with debugging the issue.


While investigating, I found out that it uses Vercel functions to host the .vercel/output folder, and the isolated-vm library requires the libstdc++ library. I am not sure if it’s available for us in the Node Serverless runtime of Vercel.

When I try to import it directly from GitHub and deploy, it uses the node20 runtime and libstdc++ library is there so everything works beautifully: Build image but not when I am deploying from CI.

CI workflow yaml:

name: Vercel Production Deployment
env:
  VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
  VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
  push:
    branches:
      - main
jobs:
  Deploy-Production:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4

      - name: Use Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20

      - name: Install Project Dependencies
        run: npm install

      - name: Install Vercel CLI
        run: npm install --global vercel@latest

      - name: Pull Vercel Environment Information
        run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

      - name: Build Project Artifacts
        run: vercel build --token=${{ secrets.VERCEL_TOKEN }}

      - name: Deploy Project Artifacts to Vercel
        run: |
          vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

Deployment URL or Custom Domain:https://nuxt-isolated-vm2-zfsc5aq0w-sidmohanty11s-projects.vercel.app/
Environment (local, preview, production): production
Project Framework: nuxtjs
Build Settings:
  Framework Preset: vercel
  Build Command (if not default):
  Output Directory (if not default):
  Install Command (if not default):
Node/Runtime Version:20
Package Manager:npm
Relevant Packages:isolated-vm

First I thought it might be that it’s not able to compile isolated-vm properly using ubuntu-latest but I just checked and it has the library in it.

GitHub repo where I am trying out workarounds: GitHub - sidmohanty11/nuxt-isolated-vm2

Hi, @sidmohanty11!

It’s been a while since you posted but wanted to follow-up (appreciate your patience!) Did you manage to figure out what went wrong?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.