#Client wont start
26 messages · Page 1 of 1 (latest)
Post your code
const { chromium } = require('playwright');
const axios = require('axios');
const cheerio = require('cheerio');
const fs = require('fs');
const path = require('path');
const { Client, MessageMedia, LocalAuth } = require('whatsapp-web.js');
const qrcode = require('qrcode-terminal');
const { console } = require('inspector');
const client = new Client({
authStrategy: new LocalAuth()
});
client.on('qr', qr => {
qrcode.generate(qr, { small: true });
});
client.on('ready', () => {
console.log('Client is ready!');
});
client.on('message_create', async message => {
if (message.body === 'files') {
//functions
}
});
client.initialize();
there is no error. the client just wont start
I entered node . but nothing happens
You missed the console.log(qr);
but it shows me the qr code
but after that nothing happens
i got this when i installed whatsapp-web
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN deprecated [email protected]: < 22.8.2 is no longer supported
added 114 packages, and audited 147 packages in 13s
24 packages are looking for funding
run `npm fund` for details
4 high severity vulnerabilities
To address all issues, run:
npm audit fix
Run `npm audit` for details.
but it worked before
npm install [email protected]
What do you want to happen?
that the client print that it is ready
the qr code works, but nothing happens after i scan it
Install the latest version I posted above, delete folders .wwebjs_auth and .wwebjs_cache and restart your project
still not working
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN deprecated [email protected]: < 22.8.2 is no longer supported
added 114 packages, and audited 148 packages in 12s
24 packages are looking for funding
run `npm fund` for details
4 high severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
Certainly you are doing something wrong
it worked before
idk
ill try to make a new project
@cosmic lava it worked somehow??????
Because it was not a lib problem, was a problem in your end
it was because one of the other import things
Maybe
const { console } = require('inspector');