ytdl-core has some issues with miniget and also stream abort issues. On the other hand, youtube-dl is a very perfect alternative but it takes time to launch. Hence, play-dl is created to avoid these issues along with providing comparatively faster performance than others.
This is a light-weight youtube downloader and searcher.
npm install play-dl@latest
import * as play from 'play-dl' // ES-6 import or TS import const play = require('play-dl') //JS importing
Instructions for Spotify are here