twitter-v2 icon indicating copy to clipboard operation
twitter-v2 copied to clipboard

TypeError: url_1.URL is not a constructor

Open Venegrad opened this issue 2 years ago • 1 comments

Im trying to create first step, from oficial instruction

const Twitter = require('twitter-v2');

const client = new Twitter({
  bearer_token: token,
  consumer_key: '***',
  consumer_secret: '***',

});

const { data } = await client.get('tweets', { ids: '1228393702244134912' });
console.log(data);

And get an error:

TypeError: url_1.URL is not a constructor.

I cant undestand what im do wrong, how i can get tweets from specific user? Help pls/

Venegrad avatar Nov 23 '22 17:11 Venegrad

Same issue here!

Yagasaki7K avatar Apr 22 '24 15:04 Yagasaki7K