microlinkhq / metascraper

Get unified metadata from websites using Open Graph, Microdata, RDFa, Twitter Cards, JSON-LD, HTML, and more.
https://metascraper.js.org
MIT License
2.35k stars 168 forks source link

fix: work with tsconfig `module: node16` in ESM #699

Closed nix6839 closed 8 months ago

nix6839 commented 8 months ago

Fix an issue with types not working correctly in module: node16 in TypeScript. See: https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseExportDefault.md

Kikobeats commented 8 months ago

I'm not sure about this. Types are working for rest of users and the project isn't supporting node16.

isn't upgrade to node18 an option for you?

nix6839 commented 8 months ago

I realized my explanation was insufficient. I apologize.

module: node16 is setting in tsconfig.json. It is different from the actual version of Node.js.

Specifically, I encounter errors when using module: node16 with ESM. I've revised the title and commit message.

You can see the reproduction here