Working nodejs telegram bot getting "Object.fromEntries is not a function" error when uploaded on asus tinkerboard

Hi, got this error when executing telegram bot on asus tinkerboard after uploading it with balena cli.
This bot works perfectly outside, everything is at the latest version.
Can’t figure out why it’s giving me this error on “compact.js”.
Did every type of reset.
Node version 14.17.3

Any help is appreciated

<main> > vmh_bot@1.0.0 start /usr/src/app
<main> > node vmh_bot.js
<main> 
<main> /usr/src/app/node_modules/telegraf/lib/core/helpers/compact.js:11
<main>     return Object.fromEntries(compactEntries);
<main>                   ^
<main> 
<main> TypeError: Object.fromEntries is not a function
<main>     at Object.compactOptions (/usr/src/app/node_modules/telegraf/lib/core/helpers/compact.js:11:19)
<main>     at new ApiClient (/usr/src/app/node_modules/telegraf/lib/core/network/client.js:208:26)
<main>     at new Telegram (/usr/src/app/node_modules/telegraf/lib/telegram.js:7:1)
<main>     at new Telegraf (/usr/src/app/node_modules/telegraf/lib/telegraf.js:45:25)
<main>     at Object.<anonymous> (/usr/src/app/vmh_bot.js:4:13)
<main>     at Module._compile (internal/modules/cjs/loader.js:689:30)
<main>     at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
<main>     at Module.load (internal/modules/cjs/loader.js:599:32)
<main>     at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
<main>     at Function.Module._load (internal/modules/cjs/loader.js:530:3)
<main> npm ERR! code ELIFECYCLE
<main> npm ERR! errno 1
<main> npm ERR! vmh_bot@1.0.0 start: `node vmh_bot.js`
<main> npm ERR! Exit status 1
<main> npm ERR! 
<main> npm ERR! Failed at the vmh_bot@1.0.0 start script.
<main> npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
<main> 
<main> npm ERR! A complete log of this run can be found in:
<main> npm ERR!     /root/.npm/_logs/2021-07-15T16_13_23_401Z-debug.log
Service exited 'main sha256:f558421c653fa5eab4a49b62c5e02c5fc04dbe2e020eab97a597afbc940dd79d'

Hey there, welcome to the forums!

We found this telegraf issue that looks related, but you said you are already running Node 14, so maybe it’s not the same issue?

If you want to share your container Dockerfile perhaps we can try to reproduce the failure. It might also be worth opening an issue on the telegraf repo and link it here.

I have to admit that I’m pretty new about developing, I just wrote some simple “bot.hears” with telegraf library. Just found out few days ago what a package,json is and never used git so I don’t really know what a dockerfile is, hope you can understand :confused:
Anyway it’s working smoothly on glitch.com but i wanted to host it on my asus tinkerboard via balena to have it on all the time.

package.json

{
  "name": "hello-node",
  "version": "0.0.1",
  "description": "A simple Node app built on fastify, instantly up and running.",
  "main": "server.js",
  "scripts": {
    "start": "node index.js"
  },
  "dependencies": {
    "fastify": "^3.14.1",
    "fastify-formbody": "^5.0.0",
    "fastify-static": "^4.0.0",
    "handlebars": "^4.7.7",
    "node-schedule": "^2.0.0",
    "point-of-view": "^4.14.0",
    "telegraf": "^4.4.0"
  },
  "engines": {
    "node": "14.17.3"
  },
  "repository": {
    "url": "https://glitch.com/edit/#!/glitch-hello-node"
  },
  "license": "MIT",
  "keywords": [
    "node",
    "glitch",
    "express"
  ]
}

Hi, to gain more insight, could you enable telegraf library debugging by setting DEBUG='telegraf:*'? You could change your start script to look like DEBUG='telegraf:*' node index.js to do so. That should give you additional output on what might be causing the issue.

Hello! is this running for you? did you enable the debugging on the telegraf library to get more insights? Let’s stay connected