Closed LewdHuTao closed 3 months ago
I don't know if this is os related issue or not but right now I use this as temporarily fixed to make it work on both windows and linux
let ytm;
try {
// For windows
ytm = new YTMusic.default();
await ytm.initialize();
} catch {
// For linux
ytm = new YTMusic();
await ytm.initialize();
}
Deleting node_modules and reinstall all package seems to fix the issue.
Please describe the current behaviour of the code.
So previously i use the suggested fix in #30 to fix this issue by using
const ytm = new YTMusic.default()
; but after i update to v5.2.2 the error still occured but only on windows. When i tested on linux it works perfectly fine.Please describe the expected behaviour of the code.
It should no longer return
YTMusic is not a constructor
What are the steps to reproduce the error?
Additional Information
This code is in javascript Tested on windows and linux ytmusic-api: v5.2.2 node.js: v20.10.0