jlobos / instagram-web-api

🤳 Instagram Private Web API client for Node
https://npmjs.com/instagram-web-api
MIT License
1.12k stars 189 forks source link

RequestError: Error: getaddrinfo EAI_AGAIN www.instagram.com #282

Open marco910 opened 2 years ago

marco910 commented 2 years ago

I'm using this code in my React app:

  const client = new Instagram({
    username: process.env.IG_USERNAME,
    password: process.env.IG_PASSWORD,
  });
  try {
    await client.login();
  } catch (err) {
    console.log("Something went wrong while logging into Instagram", err);
  }

  const profile = await client.getProfile();

  console.log(profile);

After await client.login(); I'm getting this error:

RequestError: Error: getaddrinfo EAI_AGAIN www.instagram.com

How can I fix this?