#Finding it difficult to run wweb-js locally

5 messages · Page 1 of 1 (latest)

leaden salmon
#

when I try to run this code

const { Client } = require('whatsapp-web.js');
const qrcode = require('qrcode-terminal');

const client = new Client();

client.on('ready', () => {
console.log('Client is ready!');
});

client.on('qr', qr => {
qrcode.generate(qr, {small: true});
});

client.initialize();

from the wweb-js guide, it keeps giving me this error

node:internal/child_process:421
throw new ErrnoException(err, 'spawn');
^

Error: spawn Unknown system error -86
at ChildProcess.spawn (node:internal/child_process:421:11)
at Object.spawn (node:child_process:762:9)
at BrowserRunner.start (/Users/rotimi/Desktop/projects/wwebjs-bot/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:121:34)
at ChromeLauncher.launch (/Users/rotimi/Desktop/projects/wwebjs-bot/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:76:16)
at async Client.initialize (/Users/rotimi/Desktop/projects/wwebjs-bot/node_modules/whatsapp-web.js/src/Client.js:305:23) {
errno: -86,
code: 'Unknown system error -86',
syscall: 'spawn'
}

How can i go about resolving this

dense light
#

Linux?

leaden salmon
#

mac os

dense light
#

Reinstall the lib, because the error is the lib can't open the browser

leaden salmon
#

alright. should i install the latest version