Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: fetch is not a function / could not find fetch library #40

Closed
twlite opened this issue Dec 11, 2021 · 0 comments
Closed

TypeError: fetch is not a function / could not find fetch library #40

twlite opened this issue Dec 11, 2021 · 0 comments
Labels
discussion Comment Thread

Comments

@twlite
Copy link
Owner

twlite commented Dec 11, 2021

This issue may occur if you are using this library with nodejs. If you are getting this error, it is because you don't have fetch api installed.
You can install undici or node-fetch v2.x and youtube-sr automatically finds and uses one. If you have node-fetch installed and youtube-sr is still throwing this error, it could be due to node-fetch version 3 being installed on your project. Run npm install node-fetch@2.6.6 for example to fix this issue.

NOTE: undici is given priority over node-fetch.

@twlite twlite pinned this issue Dec 11, 2021
@twlite twlite closed this as completed Dec 11, 2021
@twlite twlite reopened this Jan 18, 2022
@twlite twlite added discussion Comment Thread bug Something isn't working and removed bug Something isn't working labels Jan 18, 2022
@twlite twlite changed the title TypeError: fetch is not a function TypeError: fetch is not a function / could not find fetch library Jan 18, 2022
@twlite twlite closed this as completed Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Comment Thread
Projects
None yet
Development

No branches or pull requests

1 participant