Skip to content
This repository was archived by the owner on Dec 14, 2025. It is now read-only.
This repository was archived by the owner on Dec 14, 2025. It is now read-only.

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

@twlite

Description

@twlite

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions