#Client wont start

26 messages · Page 1 of 1 (latest)

lean hemlock
#

Node Version:
v18.19.0
Npm Version:
9.2.0

The Client only shows me the qr code to log in, but it never prints, that the Client is ready. The Client was worin once, but then it stopped

cosmic lava
#

Post your code

lean hemlock
# cosmic lava 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

cosmic lava
#

You missed the console.log(qr);

lean hemlock
#

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

cosmic lava
cosmic lava
lean hemlock
#

the qr code works, but nothing happens after i scan it

cosmic lava
#

Install the latest version I posted above, delete folders .wwebjs_auth and .wwebjs_cache and restart your project

lean hemlock
#
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.
cosmic lava
#

Certainly you are doing something wrong

lean hemlock
#

it worked before

#

idk

#

ill try to make a new project

#

@cosmic lava it worked somehow??????

cosmic lava
#

Because it was not a lib problem, was a problem in your end

lean hemlock
lean hemlock
#

const { console } = require('inspector');