twlite / youtube-sr

A dead-simple youtube metadata scraper
https://npmjs.com/package/youtube-sr
MIT License
113 stars 16 forks source link

[Bun] Module importing error #56

Closed 8549 closed 11 months ago

8549 commented 11 months ago

Hello, I am using Bun 1.0.13 and youtube-sr 4.3.9, importing with import { YouTube } from "youtube-sr"; gives the following error:

Could not find a declaration file for module 'youtube-sr'. '[REDACTED]/node_modules/youtube-sr/dist/mod.mjs' implicitly has an 'any' type.
There are types at '[REDACTED]/node_modules/youtube-sr/dist/mod.d.ts', but this result could not be resolved when respecting package.json "exports". The 'youtube-sr' library may need to update its package.json or typings.ts(7016)

What is the correct way to import the library using Bun? Thanks in advance.

twlite commented 11 months ago

Hi, this seems to be caused by the exports field in package.json file, I will fix this soon.

8549 commented 11 months ago

Thanks, any ETA on the fix release? How can I import the library in the meantime?

twlite commented 11 months ago

@8549 hi this should be fixed now with v4.3.10