Hello. I'm trying to run the code from the example:
import { IgApiClient } from 'instagram-private-api';
import { withFbnsAndRealtime, withFbns, withRealtime } from 'instagram_mqtt';
// wrap the client
// ig is now IgApiClientMQTT for typescript users
const ig = withFbnsAndRealtime(new IgApiClient());
console.log("init ");
But I get a mistake:
.../node_modules/mqtts/dist/mqtt.constants.js:21
const reverseMapping = Object.fromEntries(Object.entries(PacketType).map(([k, v]) => [v, k]));
^
TypeError: Object.fromEntries is not a function
Hello. I'm trying to run the code from the example:
But I get a mistake:
What to do and how to fix?