tall icon indicating copy to clipboard operation
tall copied to clipboard

TypeError: The "listener" argument must be of type Function. Received type object

Open Nsrose opened this issue 2 years ago • 2 comments

I can't seem to get this to work. I have installed the package, and I am running nextjs.

Here is my code:

import { tall } from 'tall'; var airbnblink = 'https://abnb.me/YEO24YyMisb'; tall(airbnblink).then(function(response) { console.log(response); }) .catch(function(err) { console.log(err); })

But I can't get this to run - console keeps saying: TypeError: The "listener" argument must be of type Function. Received type object

Any ideas why?

Nsrose avatar Aug 08 '22 17:08 Nsrose

Are you using this in the fronted or on a next.js API? I doubt this works on the frontend because it uses Node.js http package to do the HTTP requests.

PS: Even if we were to use fetch, you'd most likely run into CORS problems...

lmammino avatar Aug 09 '22 08:08 lmammino

I am also facing this issue. When I tested it in a simple node app, it worked but when I tried to use it in a react app it fails.

chaitanyasanoriya avatar Dec 05 '22 23:12 chaitanyasanoriya