jshemas / openGraphScraper

Node.js scraper service for Open Graph Info and More!
MIT License
643 stars 102 forks source link

Please provide ESM export #223

Closed michalkvasnicak closed 3 weeks ago

michalkvasnicak commented 3 weeks ago

It is hard to use this package when producing ESM native modules for nodejs 18+.

When you configure a project to use moduleResolution: 'NodeNext' and module: 'NodeNext', you will get TS2349 error saying that the open-graph-scraper has no call signatures. That is the result of improper typings produced that are pretending to be ESM compatible but in reality they aren't and they would break the runtime.

jshemas commented 3 weeks ago

Unable to reproduce the issue. Please follow the Bug report template next time and give a full working example of your issue.