Answer the question
In order to leave comments, you need to log in
How to fix node js error?
I'm trying to use the whatsapp-web.js library.
running app.js on vps
const { Client } = require('whatsapp-web.js');
const client = new Client();
client.on('qr', (qr) => {
// Generate and scan this code with your phone
console.log('QR RECEIVED', qr);
});
client.on('ready', () => {
console.log('Client is ready!');
});
client.on('message', msg => {
if (msg.body == '!ping') {
msg.reply('pong');
}
});
client.initialize();
Error: Failed to launch the browser process!
0|a | [1212/224305.004595:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
0|a |
0|a |
0|a | TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
0|a |
0|a | at onClose (/var/www/178-21-11-22.cloudvps.regruhosting.ru/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
0|a | at Interface.<anonymous> (/var/www/178-21-11-22.cloudvps.regruhosting.ru/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)
0|a | at Interface.emit (events.js:326:22)
0|a | at Interface.close (readline.js:416:8)
0|a | at Socket.onend (readline.js:194:10)
0|a | at Socket.emit (events.js:326:22)
0|a | at endReadableNT (_stream_readable.js:1241:12)
0|a | at processTicksAndRejections (internal/process/task_queues.js:84:21)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question