Welcome!
What did you do?
A couple months ago i installed version 2.2.3 via NVM, today i tried update to the last version 2.3.4 following the commands on docs https://doc.evolution-api.com/v2/pt/updates#atualiza%C3%A7%C3%A3o-com-npm
I was suprised by the folowing error after start npm .
1|ApiEvolution | Error [ERR_REQUIRE_ESM]: require() of ES Module /www/wwwroot/pasta/evolution-api/node_modules/baileys/lib/index.js from /www/wwwroot/pasta/evolution-api/dist/main.js not supported.
1|ApiEvolution | Instead change the require of index.js in /www/wwwroot/pasta/evolution-api/dist/main.js to a dynamic import() which is available in all CommonJS modules.
1|ApiEvolution | at Object. (/www/wwwroot/pasta/evolution-api/dist/main.js:2:3003) {
1|ApiEvolution | code: 'ERR_REQUIRE_ESM'
1|ApiEvolution | }
1|ApiEvolution | Node.js v20.10.0
1|ApiEvolution | > evolution-api@2.3.4 start:prod
1|ApiEvolution | > node dist/main
1|ApiEvolution | /www/wwwroot/pasta/evolution-api/dist/main.js:2
What is your environment?
Linux
Welcome!
What did you do?
A couple months ago i installed version 2.2.3 via NVM, today i tried update to the last version 2.3.4 following the commands on docs https://doc.evolution-api.com/v2/pt/updates#atualiza%C3%A7%C3%A3o-com-npm
I was suprised by the folowing error after start npm .
1|ApiEvolution | Error [ERR_REQUIRE_ESM]: require() of ES Module /www/wwwroot/pasta/evolution-api/node_modules/baileys/lib/index.js from /www/wwwroot/pasta/evolution-api/dist/main.js not supported.
1|ApiEvolution | Instead change the require of index.js in /www/wwwroot/pasta/evolution-api/dist/main.js to a dynamic import() which is available in all CommonJS modules.
1|ApiEvolution | at Object. (/www/wwwroot/pasta/evolution-api/dist/main.js:2:3003) {
1|ApiEvolution | code: 'ERR_REQUIRE_ESM'
1|ApiEvolution | }
1|ApiEvolution | Node.js v20.10.0
1|ApiEvolution | > evolution-api@2.3.4 start:prod
1|ApiEvolution | > node dist/main
1|ApiEvolution | /www/wwwroot/pasta/evolution-api/dist/main.js:2
What is your environment?
Linux