If you are experiencing this error in your IDE:
/Users/UserName/Project/node_modules/telegraf/lib/core/network/client.js:291
throw new error_1.default(data, { method, payload });
^
TelegramError: 404: Not Found
at Telegram.callApi (/Users/UserName/Project/node_modules/telegraf/lib/core/network/client.js:291:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Telegraf.launch (/Users/UserName/Project/node_modules/telegraf/lib/telegraf.js:182:78) {
response: { ok: false, error_code: 404, description: 'Not Found' },
on: { method: 'getMe', payload: {} }
}
Then you most likely have a problem with your .env file (specifically the bot token). Make sure your .env file parameters are written without trailing semicolons and without quotes (the latter is not required, but it may be important in your case).
I also recommend using the dotenv package if you are working in a node environment with .env files.