Debian 10 Buster headless
Shared Libraries needed
$ sudo apt install libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libasound2 libpangocairo-1.0-0 libxss1 libgtk-3-0
Local user
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
Reconnect/Reload or load manually
nvm install node
Create a new foler and install puppeteer
$ mkdir test && pushd test
$ npm i puppeteer # or yarn add puppeteer
Create a new file
$ nano test.js
Content
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com');
await page.screenshot({path: 'example.png'});
await browser.close();
})();
If all went fine you will have a screenshot of the page on your current folder.
Can u run the test code? What code are you currently running? If you post the code with the error message, it is easier to guess. Permission errors are easy to solve, but out of scope in this case...I suggest you learn that (it is really really easy in linux/unix).