builder icon indicating copy to clipboard operation
builder copied to clipboard

Nuxt3 - isolated-vm issue on Vercel

Open 20x-dz opened this issue 4 months ago • 7 comments

Describe the bug Following the latest release ([email protected]) with #3560, I immediately installed the latest version to see if #3288 was indeed fixed.

To Reproduce Steps to reproduce the behavior:

  1. Deploy to vercel through a github CI/CD pipeline (on ubuntu-latest with node: 20 and nitro's vercel preset)
  2. visit the preview url after deployment
  3. See the following error in the logs:
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:11708
    at Function.dr (/opt/rust/nodejs.js:1:12082)
    at e.<computed>.oe._load (/opt/rust/nodejs.js:1:11678)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/var/task/node_modules/isolated-vm/isolated-vm.js:1:18)
    at Module._compile (node:internal/modules/cjs/loader:1469:14) {
  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:11708
    at Function.dr (/opt/rust/nodejs.js:1:12082)
    at e.<computed>.oe._load (/opt/rust/nodejs.js:1:11678)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/var/task/node_modules/isolated-vm/isolated-vm.js:1:18)
    at Module._compile (node:internal/modules/cjs/loader:1469:14) {
  code: 'ERR_DLOPEN_FAILED'
}
Node.js process exited with exit status: 128. The logs above can help with debugging the issue.

Expected behavior See the rendered page.

Screenshots image

Additional context Only the module was added to nuxt.config.ts:

diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts
index 0f0bd96c..9db6641e 100644
--- a/frontend/nuxt.config.ts
+++ b/frontend/nuxt.config.ts
@@ -190,7 +190,13 @@ export default defineNuxtConfig({
     },
   },
   modules: [
-    "@builder.io/sdk-vue/nuxt",
+    [
+      "@builder.io/sdk-vue/nuxt",
+      {
+        includeCompiledCss: true, // Includes Builder.io CSS (default: true)
+        initializeNodeRuntime: true, // Initializes isolated VM in Node runtime (default: false)
+      },
+    ],
     "nuxt-svgo",
     "@nuxt/image",
     "@nuxtjs/tailwindcss",

Loosely related to #3604

20x-dz avatar Oct 04 '24 17:10 20x-dz