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.
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
ornode-fetch
v2.x and youtube-sr automatically finds and uses one. If you havenode-fetch
installed andyoutube-sr
is still throwing this error, it could be due tonode-fetch
version 3 being installed on your project. Runnpm install node-fetch@2.6.6
for example to fix this issue.