node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
-
vercel에서 next js를 deploy하던중 아래와 같은 오류가 났습니다. 아래 제일 처음 warning부분을 보면 pakage.json에 node 16.x가 18.x로 최신버전을 업데이트 하라고 하더군요.
vercel 공식문서에서는 새 프로젝트를 생성할때마다 node version을 최신버전만 반영된다고 합니다.
[23:02:49.002] Running build in Cleveland, USA (East) – cle1 [23:02:49.051] Cloning github.com/minsing-jin/web_study_2 (Branch: main, Commit: 1820a7c) [23:02:49.303] Previous build cache not available [23:02:49.456] Cloning completed: 404.361ms [23:02:49.559] Running "vercel build" [23:02:50.006] Vercel CLI 28.15.3 [23:02:50.247] Warning: Due to "engines": { "node": "16.X" } in your `package.json` file, the Node.js Version defined in your Project Settings ("18.x") will not apply. Learn More: http://vercel.link/node-version [23:02:50.255] Your application is being built using `next build`. If you need to define a different build step, please create a `vercel-build` script in your `package.json` (e.g. `{ "scripts": { "vercel-build": "npm run prepare && next build" } }`). [23:02:50.257] Installing dependencies... [23:03:02.718] [23:03:02.719] added 303 packages in 12s [23:03:02.719] [23:03:02.719] 106 packages are looking for funding [23:03:02.719] run `npm fund` for details [23:03:02.733] Detected Next.js version: 13.1.1 [23:03:02.737] Detected `package-lock.json` generated by npm 7+... [23:03:02.737] Running "npm run vercel-build" [23:03:03.033] [23:03:03.034] > portfolio_site@0.1.0 vercel-build [23:03:03.034] > next build [23:03:03.034] [23:03:03.486] Attention: Next.js now collects completely anonymous telemetry regarding usage. [23:03:03.487] This information is used to shape Next.js' roadmap and prioritize features. [23:03:03.487] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: [23:03:03.487] https://nextjs.org/telemetry [23:03:03.487] [23:03:03.591] info - Linting and checking validity of types... [23:03:05.591] [23:03:05.591] Failed to compile. [23:03:05.591] [23:03:05.592] ./components/dark-mode-toggle-buttion.js [23:03:05.592] 33:85 Error: No duplicate props allowed react/jsx-no-duplicate-props [23:03:05.592] 40:85 Error: No duplicate props allowed react/jsx-no-duplicate-props [23:03:05.592] [23:03:05.592] info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules [23:03:05.614] Error: Command "npm run vercel-build" exited with 1
구름의 프로젝트의 node version을 16.x으로 되어있던걸 18.x로 바꾸려고 했습니다. 그렇게 하기 위해서 nodejs를 지웠다가 node lts로 18.x를 업데이트 시키려고 n -lts를 했지만 아래와 같은 오류가 뜨고
node: /lib/x86_64-linux-gnu/libc.so.6: version
GLIBC_2.28' not found (required by node) /usr/local/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version
GLIBC_2.28' not found (requir
ed by /usr/local/bin/node)node -v 으로 node version을 확인하려해도
node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node) 오류가 뜹니다.
초반에 node version을 16.x로 설정하면 다시는 못바꾸는 건가요?
아래는 저의 pakage.json파일 목록들입니다.
{ "name": "portfolio_site", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start" }, "dependencies": { "@next/font": "13.1.1", "autoprefixer": "^10.4.13", "date-fns": "^2.29.3", "dotenv": "^16.0.3", "eslint": "8.31.0", "eslint-config-next": "13.1.1", "next": "^13.1.1", "next-themes": "^0.2.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-lottie-player": "^1.5.4" }, "devDependencies": { "tailwindcss": "^3.2.4" }, "scripts": { "start": "node_modules/next/dist/bin/next start -p $PORT" }, "engines": { "node": "16.X" } }
-
nodejs 18을 ubuntu18에서 지원하지 않아서 생기는 문제입니다. 현재 그룸에서는 node에 ubuntu18까지만 지원하고 있어 최신버전의 노드를 사용하는 것은 어려울 것 같습니다.