반응형

문제

서버 환경(centos7)에서 실행하니 error 발생

 

UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
[0220/171512.042961:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.

 

해결 방법

const browser = await puppeteer.launch({
headless: true,
args: ['--no-sandbox']
})

 

반응형

'javascript' 카테고리의 다른 글

[Javascript][yargs] show/print help  (0) 2020.02.21
[javascript] if number 조건일 때 주의  (0) 2020.01.09
[javascript] array - includes()  (0) 2019.12.09

+ Recent posts