twlite / youtube-sr

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

[Bun] Module importing error #56

Closed 8549 closed 1 year ago

8549 commented 1 year 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 1 year ago

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

8549 commented 1 year ago

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

twlite commented 1 year ago

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