-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The latest version does not support ESM #2326
Comments
same here |
Same issue |
just use this code in the check-up-to-date.js "use strict";
} |
same problem here. |
same error |
getting this error now: Unable to access: "https://www.npmjs.com", check your internet |
Same error, catch (_a) {
console.log(_a)
console.log('Unable to access: "https://www.npmjs.com", check your internet');
return false;
} it returns when i downgrade 'latest-version' to |
same problem here :( |
Download the latest version! npm i venom-bot@5.0.6 |
with version 5.0.6 ✖ Error no open browser.... |
same here |
bro this is browser problem! O Puppeteer had an update in this latest version! You will have to update your browser! |
Description
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 node_modules/latest-version/index.js from node_modules/venom-bot/dist/controllers/check-up-to-date.js not supported.
Instead change the require of index.js in node_modules/venom-bot/dist/controllers/check-up-to-date.js to a dynamic import() which is available in all CommonJS modules.
at Object. (node_modules/venom-bot/dist/controllers/check-up-to-date.js:7:42)
at Object. (node_modules/venom-bot/dist/controllers/init.js:4:28)
at Object. (node_modules/venom-bot/dist/index.js:30:14)
at async Promise.all (index 0) {
code: 'ERR_REQUIRE_ESM'
}
Environment
Steps to Reproduce
await create(
//session
'sessionName', //Pass the name of the client you want to start the bot
//catchQR
(base64Qrimg, asciiQR, attempts, urlCode) => {
if (attempts >= 1) {
console.log("Number of attempts to read the qrcode: ", attempts);
socket.emit("image", base64Qrimg);
socket.local.emit("image", base64Qrimg);
}
//console.log('Number of attempts to read the qrcode: ', attempts);
//console.log('Terminal qrcode: ', asciiQR);
//console.log('base64 image string qrcode: ', base64Qrimg);
//console.log('urlCode (data-ref): ', urlCode);
},
// statusFind
(statusSession, session) => {
//console.log("Status -> Session: ", statusSession);
//console.log("estado de la session ", statusSession);
if (statusSession == "qrReadSuccess" || statusSession == "isLogged") {
sessionIniciada = true;
//emitir("msg", "Ya conectado" + statusFind);
The text was updated successfully, but these errors were encountered: