bzarras / newsapi

A promise-based node interface for NewsAPI
MIT License
144 stars 39 forks source link

"querystring" has been externalized for browser compatibility. Cannot access "querystring.stringify" in client code. #47

Open kisshan13 opened 1 year ago

kisshan13 commented 1 year ago

Well I'm using newsapi to build a news application but in your ./dist/index.js there's a function createUrlFromEndpointAndOptions causing some problem that prevent it to run in browser.

var query = qs.stringify(options); This line causing the problem.

Things I conclude from this :

  1. querystring library is completely built for node or we can say that it's for server only.
  2. In order to run the newsapi in client side we have to implement some other method to get the desire result.

Thank You!!