chatgpt-whatsapp icon indicating copy to clipboard operation
chatgpt-whatsapp copied to clipboard

how to host in vps

Open jerry-619 opened this issue 2 years ago • 2 comments

i'm not able to host bot in ubuntu vps it gives some error can you help me

jerry-619 avatar Jun 06 '23 05:06 jerry-619

i am getting this error

file:///home/runner/chatgpt-whatsapp/node_modules/chatgpt/build/index.js:174 throw new Error("Invalid environment; fetch is not defined"); ^

Error: Invalid environment; fetch is not defined at new ChatGPTAPI (file:///home/runner/chatgpt-whatsapp/node_modules/chatgpt/build/index.js:174:13) at file:///home/runner/chatgpt-whatsapp/dist/index.js:7:20 at ModuleJob.run (node:internal/modules/esm/module_job:193:25) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:526:24) at async loadESM (node:internal/process/esm_loader:91:5) at async handleMainPromise (node:internal/modules/run_main:65:12) exit status 1

heyfolk avatar Jun 06 '23 06:06 heyfolk

As mentioned in this issue, you need to use node>=18 so fetch is available.

or maybe you can try to install this package?

Andndre avatar Jun 06 '23 10:06 Andndre