TIL(Today I Learned)/스파르타 내배캠 최종프로젝트

[TIL]24/01/27 Troubleshooting: puppeteer vercel 배포 에러

개발자먼지 2024. 1. 28. 03:33
반응형

에러 시작~!

puppeteer version : 21.9.0

Error: Failed to launch the browser process!
[475:475:0127/171203.505723:ERROR:zygote_host_impl_linux.cc(100)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

 

시도 1 : https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

 

에러 1-2 : 

Error [ERR_REQUIRE_ESM]: require() of ES Module /vercel/path0/node_modules/string-width/index.js from /vercel/path0/node_modules/cliui/build/index.cjs not supported

 

시도 1-2: https://velog.io/@kdkeiie8/NodeJS-node-fetch-%EC%97%90%EB%9F%AC-%ED%95%B4%EA%B2%B0-Error-ERRREQUIREESM-require-of-ES-Module-from-not-supported  

-> 포기 

 


시도 2 : https://stackoverflow.com/questions/59979188/error-failed-to-launch-the-browser-process-puppeteer

const GetSurfitArticles = async () => {
  if (!browser) {
    browser = await puppeteer.launch({
      headless: "new",
      args: ["--no-sandbox", "--disabled-setupid-sandbox"],
    })
  }

 

 

성공..?  ㅡㅡ 

전에 실패했을 때는 puppteer 18. 으로 돌리고 시도 2 적용 했을 때.... ㅡㅡ?

 

--no-sandbox에 대해 다시 알아보자.

 하지말라고 권고 하던데..ㅠ.ㅠ

찝찝..

아니 커밋 다시올리니 또 안된다. (됐다안됐다 하는건 뭔데)

 

에러 2-2 : 에러도 가지가지  이건 왜뜬지 모르겠는데 재배포하니까 다시 되길래 ..........-_- 

Error: Could not find Chrome (ver. 121.0.6167.85). This can occur if either

 

메인 반영하고 배포 했따...

일단 칼럼 잘 뜬다..

반응형