blakejoy / tmdb-ts

Typescript client wrapper for TheMovieDB (TMDB) v3
MIT License
40 stars 13 forks source link

TypeError: querystring_1.default.encode is not a function when searching for movie #13

Closed Hoidi closed 1 year ago

Hoidi commented 1 year ago

Describe the bug When I call the following function

const movies = await tmdb.search.movies({ query: 'Babylon' });

I get this error TypeError: querystring_1.default.encode is not a function in search.ts:49

However, it seems the code is working in my console as I can log stuff related to the search results. See Additional information why that might be the case

To Reproduce Steps to reproduce the behavior:

  1. Call tmdb.search.movies with some query parameter
  2. See error

Expected behavior A search result should be returned

Desktop (please complete the following information):

blakejoy commented 1 year ago

Ahh I see. Initially my thought process when creating this wrapper was to only use it server side. It seems like in your case you're using on the client ?

Hoidi commented 1 year ago

That is the case indeed