Hi friends, i am getting this error when i run "npm run dev" (prod mode its ok):
[...]/backend/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221
throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
^
Error: Evaluation failed: ReferenceError: __name is not defined
at moduleRaid (eval at <anonymous> (:1:18), <anonymous>:1:103)
at __puppeteer_evaluation_script__:1:68
at ExecutionContext._evaluateInternal ([...]/backend/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at ExecutionContext.evaluate ([...]/backend/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
at Client.initialize ([...]/backend/node_modules/whatsapp-web.js/src/Client.js:322:9)
The erro occurred only if you are logged in on WhatsApp.
Expected behavior
Just expect to open a logged in WhatsApp page.
Steps to Reproduce the Bug or Issue
You need to set this scripts on your package.json:
Is there an existing issue for this?
Describe the bug
Hi friends, i am getting this error when i run "npm run dev" (prod mode its ok):
The erro occurred only if you are logged in on WhatsApp.
Expected behavior
Just expect to open a logged in WhatsApp page.
Steps to Reproduce the Bug or Issue
You need to set this scripts on your
package.json
:You need to set
tsx
andtypescript
versions as below:Just run
npm start
.Relevant Code
No response
Browser Type
Google Chrome
WhatsApp Account Type
WhatsApp Business
Does your WhatsApp account have multidevice enabled?
No, I am not using Multi Device
Environment
OS: Debian 12 (Linux) Phone: Android whatsapp-web.js verison: 1.22.1 WhatsApp Web Version: 2.2333.11 NodeJS Version: 18.17.0
Additional context
No response