ERROR: Error: Error parsing config: Unexpected token ; in JSON at position <position-number>
See original GitHub issueI tried running the example music-dl http://gaana.com/album/aashiqui and I got the following error:
ERROR: Error: Error parsing config: Unexpected token ; in JSON at position <position-number>
for each of the .mp3 file. I tried to debug this by injecting several console.log() into the code. I found out with:
search.findLink().then((link) => console.log("1",link))
that the YouTubeSearch returned the correct URL. However when I tried to inject:
new YouTubeDownloader(link, outputPath, outputFilename).download()
.then((mp3OutputPath) => {
console.log("HERE",mp3OutputPath)
const tagger = new Id3Tagger(mp3OutputPath, trackInfo);
tagger.tag();
resolve(mp3OutputPath);
}).catch(reject);
in youtube/client the above console.log() never outputed. Instead i got the above ERROR message. So I suspect this narrows down where the error is caused.
I am not good with java-script. Could you please debug and fix this?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Error parsing config: Unexpected token ; in JSON at ...
Was looking around the internet and it seems old youtube videos dont have an opus-stream, so you have to open it another way....
Read more >What Is JSON and How to Handle an “Unexpected Token” ...
Learn what JSON is and how you can deal with errors occurring when parsing JSON data, such as "Unexpected Token < in JSON...
Read more >Unexpected token in JSON at position 0 error
In very simple language, "Unexpected token < in JSON at position 0" indicates that you are parsing something else that is not JSON...
Read more >Errors of Unexpected token in JSON at position XXX while ...
I do not configure proxy though as my machine is not on any corporate proxy. Anyway, I attach the npm log content and...
Read more >Error syntaxerror unexpected token m in json at position 1
I get this error: SyntaxError: Unexpected token in JSON at position 0. ... If a JSON string is already parsed in a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Great! This works. However
music-dl -vormusic-dl -hdon’t work any more. I think.@GeekyPeas You’ve got an eagle’s eye! Thanks for sharing the details about the regression. I fixed it in the latest version
v0.0.10.After all, looks like this package needs some basic unit tests.