FATAL: Running as root without –no-sandbox is not supported

Attempting to install Puppeteer on Ubuntu 18.04.5 LTS (GNU/Linux 5.3.0-1034-aws x86_64) resulted in dependency errors. After resolving these dependencies, I encountered the following error:

ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported

Solution

Resolved this issue for node-html-to-image by including the “–no-sandbox” argument:

nodeHtmlToImage({ html, puppeteerArgs: { args: ['--no-sandbox'] } })

Leave a Comment