pedroslopez / whatsapp-web.js

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
https://wwebjs.dev
Apache License 2.0
14.62k stars 3.48k forks source link

SyntaxError: Unexpected token '.' #2600

Closed AlexanderConde closed 7 months ago

AlexanderConde commented 8 months ago

Is there an existing issue for this?

Describe the bug

I ran the npm i whatsapp-web.js sd-notify command and when I restart the instance I have this error and it does not allow me to restart the instance: error in /node_modules/whatsapp-web.js/src/Client.js:1354 if ((await window.Store.QueryExist(pWid))?.wid) participantWids.push(pWid); Screenshot_99

Expected behavior

As a user, i expected got Client is ready!

Steps to Reproduce the Bug or Issue

  1. npm i whatsapp-web.js sd-notify
  2. restart instance

Relevant Code

error in /node_modules/whatsapp-web.js/src/Client.js:1354 if ((await window.Store.QueryExist(pWid))?.wid) participantWids.push(pWid);

Browser Type

Chromium

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Mac, Ubuntu 22.04 LTS

Node.js Version v12.22.9

Additional context

No response

jeffersonmiranda0 commented 8 months ago

update your version nodejs to 18.17.1. Older version not supported the verify attribute is null.

innovatorssoft commented 8 months ago

Having Same Issue OS: Windows 7

Node.js Version v13 npm version 6.12.0

mabahamo commented 8 months ago

Having Same Issue OS: Windows 7

Node.js Version v13 npm version 6.12.0

NodeJs v13 was deprecated long time ago, try using nodejs 18 or newer

edudesouza commented 7 months ago

@pedroslopez would be nice update the minimum requirement pointing to node18 in my case my CentOs does not supportt node 18, I commented some lines and work fine