Skip to content
Sign upLog in
← Back to Community

puppeteer is not working

Profile icon
waki285Hacker

Hello.

I have this code:

const puppeteer = require("puppeteer"); const URL = "https://yahoo.co.jp"; (async () => { const browser = await puppeteer.launch({ ignoreDefaultArgs: ['--disable-extensions'], headless: false, slowMo: 50, args: ["--no-sandbox", "--disable-setuid-sandbox"] }); const page = await browser.newPage(); page.goto(URL); })();

but I having Error:

/home/runner/puppeteer-test/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197 reject(new Error([ ^ Error: Failed to launch the browser process! /home/runner/puppeteer-test/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md at onClose (/home/runner/puppeteer-test/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20) at Interface.<anonymous> (/home/runner/puppeteer-test/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68) at Interface.emit (node:events:406:35) at Interface.close (node:readline:586:8) at Socket.onend (node:readline:277:10) at Socket.emit (node:events:406:35) at endReadableNT (node:internal/streams/readable:1331:12) at processTicksAndRejections (node:internal/process/task_queues:83:21)

How can I fix this?

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
waki285
Comments
hotnewtop
Profile icon
Coder100

replit node does not support it you have to use the bash language:
https://replit.com/talk/share/This-time-we-are-getting-puppeteer/28380