0

bot for whatsapp bot, first I used 4.3.7 version and work good, after alawys how timeout 30000. I updated node to version 18 and venom-bot version 5.0.5 but show this error:

D:\bot-politica\newBot>node index.js D:\bot-politica\newBot\node_modules\venom-bot\dist\controllers\check-up-to-date.js:7 const latest_version_1 = __importDefault(require("latest-version")); ^

Error [ERR_REQUIRE_ESM]: require() of ES Module D:\bot-politica\newBot\node_modules\latest-version\index.js from D:\bot-politica\newBot\node_modules\venom-bot\dist\controllers\check-up-to-date.js not supported. Instead change the require of index.js in D:\bot-politica\newBot\node_modules\venom-bot\dist\controllers\check-up-to-date.js to a dynamic import() which is available in all CommonJS modules. at Object.<anonymous> (D:\bot-politica\newBot\node_modules\venom-bot\dist\controllers\check-up-to-date.js:7:42) at Object.<anonymous> (D:\bot-politica\newBot\node_modules\venom-bot\dist\controllers\init.js:4:28) at Object.<anonymous> (D:\bot-politica\newBot\node_modules\venom-bot\dist\index.js:30:14) at Object.<anonymous> (D:\bot-politica\newBot\index.js:2:14) { code: 'ERR_REQUIRE_ESM' }

Node.js v18.16.0

This is my test code:

1 Answers1

0

Install the latest 'latest-version' node module and try again. It will work properly.

AdonisDev
  • 1
  • 3