I'm trying to access a static method from an imported module I've created, but it results in throwing a TypeError error - stating that the method doesn't exist.

I've tried to export the modules differently. The method can be called if I'm using it as an instance method and not a static one, however it's not using anything which related to the class and I think it should be static.

The following static method:
(**Bot.js**)

```
const Bot = class Bot {
  static getCommandIndex(message) {
    if (!message.beginsWith('/')) {
      return undefined;
    }
    return message.split(' ');
  }
}

module.exports = Bot;

```

The module which attempts to use it:
(**BotUpdateHandler.js**)

```
const Bot = require('./Bot');
module.exports = class BotUpdateHandler {
  async handle(update) {
    const txt = update.msg.txt;
    const command = Bot.getCommandIndex(txt);
  }
}

```

I've already tried exporting and importing the modules like this:

```
// Exporting the module (Bot.js)
module.exports = { Bot };

// Importing the module (BotUpdateHandler.js)
const { Bot } = require('./Bot');

```

But that didn't work as well.

```
  TypeError: Bot.getCommandIndex is not a function

```

I'm using Node.js v10.16.0, it seems to work on browser-JavaScript when I checked it in the dev console (obviously though I wasn't doing any imports so I assume it's something to do with that).