yugoccp / slack2discord

Slack2DiscordJS - a script to help you transfer Slack messages to Discord
19 stars 3 forks source link

SyntaxError: Unexpected token I in JSON at position 1 #20

Closed kdmsnr closed 2 years ago

kdmsnr commented 2 years ago

It fails at JSON.parse.

[INFO] Read Slack XXX channel backup files...
 ^

SyntaxError: Unexpected token I in JSON at position 1
    at JSON.parse (<anonymous>)
    at Object.getMessages (/opt/homebrew/lib/node_modules/slack2discord/src/slackService.js:61:15)
    at async /opt/homebrew/lib/node_modules/slack2discord/src/commands/parseMessages.js:27:29
yugoccp commented 2 years ago

It fails at JSON.parse.

[INFO] Read Slack XXX channel backup files...
 ^

SyntaxError: Unexpected token I in JSON at position 1
    at JSON.parse (<anonymous>)
    at Object.getMessages (/opt/homebrew/lib/node_modules/slack2discord/src/slackService.js:61:15)
    at async /opt/homebrew/lib/node_modules/slack2discord/src/commands/parseMessages.js:27:29

Hi @kdmsnr ! Thanks for trying it! Could you please provide a sample of the message that are failing to parse?

nitrousnrg commented 2 years ago

same issue here...

yugoccp commented 2 years ago

same issue here...

Hey @nitrousnrg ! Thanks for using it! Could you please send a sample of the message that is failing to help me fix the issue?

yugoccp commented 2 years ago

Hi @kdmsnr @nitrousnrg ! I've upgraded DiscordJS client to latest version, hope it does work for you! Please note that it works on NodeJS 16+!

Thanks for using it!