ReactJS - node-telegram-bot-api (Uncaught TypeError: Cannot read properties of undefined (reading 'split'))

Viewed 23

I am trying to import the node-telegram-bot-api in my react app like so:`
import TelegramBot from "node-telegram-bot-api";

But upon doing this I get the following error in my console.
Error Image

This error is created upon importing alone and nothing else.
Is anyone able to help solve this issue?

1 Answers

The library is for nodejs as its name see that's why it's causing the issue. You can refer to this for Reactjs here maybe it will helpful for you.

Related