noelzappy / chatgpt-whatsapp

A simple WhatsApp bot that uses OpenAI's ChatGPT to respond to user inputs. Includes a cron to enable ChatGPT to send messages to recipients at periodic intervals.
MIT License
86 stars 40 forks source link

Error #23

Closed huda1603 closed 1 month ago

huda1603 commented 1 month ago

C:\Whatsapp BOT GPT\chatgpt-whatsapp>yarn start yarn run v1.23.0-20200615.1913 $ npm run build && node build/src/main.js

whatsapp-chatgpt@1.0.2 prebuild npm run lint

whatsapp-chatgpt@1.0.2 lint eslint . --ext .ts --ext .mts

whatsapp-chatgpt@1.0.2 build tsc -p tsconfig.json

C:\Whatsapp BOT GPT\chatgpt-whatsapp\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34 const version = indexHtml.match(/manifest-([\d\.]+).json/)[1]; ^

TypeError: Cannot read properties of null (reading '1') at LocalWebCache.persist (C:\Whatsapp BOT GPT\chatgpt-whatsapp\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34:69) at C:\Whatsapp BOT GPT\chatgpt-whatsapp\node_modules\whatsapp-web.js\src\Client.js:744:36 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.20.4 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

noelzappy commented 1 month ago

Try updating the whatsapp-web.js version to the latest. And feel free to open a PR if it works for you.