Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: Bad escaped character in JSON at position 21 at JSON.parse [Bug] #273

Open
SwiftExplorer567 opened this issue Dec 27, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@SwiftExplorer567
Copy link

SwiftExplorer567 commented Dec 27, 2022

I cannot run the code due to the error:

[2022-12-27 18:46:14] [error] Failed to read config file!
[2022-12-27 18:46:14] [error] SyntaxError: Bad escaped character in JSON at position 21
    at JSON.parse (<anonymous>)
    at ConfigurationParser.parse (file:///C:/Users/Hasan/OneDrive/Masa%C3%BCst%C3%BC/Twitch-Drops-Bot-dev/dist/configuration_parser.js:57:31)
    at file:///C:/Users/Hasan/OneDrive/Masa%C3%BCst%C3%BC/Twitch-Drops-Bot-dev/dist/index.js:351:42
    at Generator.next (<anonymous>)
    at file:///C:/Users/Hasan/OneDrive/Masa%C3%BCst%C3%BC/Twitch-Drops-Bot-dev/dist/index.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (file:///C:/Users/Hasan/OneDrive/Masa%C3%BCst%C3%BC/Twitch-Drops-Bot-dev/dist/index.js:3:12)
    at main (file:///C:/Users/Hasan/OneDrive/Masa%C3%BCst%C3%BC/Twitch-Drops-Bot-dev/dist/index.js:348:12)
    at file:///C:/Users/Hasan/OneDrive/Masa%C3%BCst%C3%BC/Twitch-Drops-Bot-dev/dist/index.js:706:5
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25)

Changed the location and the error:

[2022-12-27 18:51:01] [error] Failed to read config file!
[2022-12-27 18:51:01] [error] SyntaxError: Bad escaped character in JSON at position 21
    at JSON.parse (<anonymous>)
    at ConfigurationParser.parse (file:///C:/Twitch-Drops-Bot-dev/dist/configuration_parser.js:57:31)
    at file:///C:/Twitch-Drops-Bot-dev/dist/index.js:351:42
    at Generator.next (<anonymous>)
    at file:///C:/Twitch-Drops-Bot-dev/dist/index.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (file:///C:/Twitch-Drops-Bot-dev/dist/index.js:3:12)
    at main (file:///C:/Twitch-Drops-Bot-dev/dist/index.js:348:12)
    at file:///C:/Twitch-Drops-Bot-dev/dist/index.js:706:5
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
@SwiftExplorer567 SwiftExplorer567 added the bug Something isn't working label Dec 27, 2022
@jaredcat
Copy link

Your config file is messed up.
Paste it into there and see if you can fix it: https://jsonformatter.curiousconcept.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants