Skip to content
This repository has been archived by the owner on Jun 25, 2023. It is now read-only.

sos #164

Closed
coco66688 opened this issue Oct 23, 2020 · 11 comments
Closed

sos #164

coco66688 opened this issue Oct 23, 2020 · 11 comments
Assignees
Labels

Comments

@coco66688
Copy link

SyntaxError: C:\Users\user\Downloads\新增資料夾 (3)\Yukiko\botconfig.json: Unexpected string in JSON at position 83
at parse ()
�[90m at Object.Module._extensions..json (internal/modules/cjs/loader.js:1106:22)�[39m
�[90m at Module.load (internal/modules/cjs/loader.js:928:32)�[39m
�[90m at Function.Module._load (internal/modules/cjs/loader.js:769:14)�[39m
�[90m at Module.require (internal/modules/cjs/loader.js:952:19)�[39m
�[90m at require (internal/modules/cjs/helpers.js:88:18)�[39m
at Object. (C:\Users\user\Downloads\新增資料夾 (3)\Yukiko\index.js:2:17)
�[90m at Module._compile (internal/modules/cjs/loader.js:1063:30)�[39m
�[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)�[39m
�[90m at Module.load (internal/modules/cjs/loader.js:928:32)�[39m

@Asthriona Asthriona self-assigned this Oct 23, 2020
@Asthriona
Copy link
Owner

Greetings, @sam920829 !
We need a bit more than just a few logs to be able to help you.
Please send the content of your botconfig.json, since it appears to be the issue.
remember DO NOT SEND ANY OF YOUR TOKEN! replace it with anything else that doesn't look like your token.

Thank you.

@coco66688
Copy link
Author

{
"token": "......................................................................................"
"prefix": "a!"
"YtKey": "AIzaSyDUTJS4N3YVg9Nd5XXOEC2vHs9LTIa6Zcs"
"dbLink": "mongodb+srv:https://USERNAME:[email protected]/discordbot?retryWrites=true&w=majority"

@Heazher
Copy link
Collaborator

Heazher commented Oct 24, 2020

Hey there @sam920829 !
JSON files are supposed to have a commas at the end of every lines.
I can recommends to simply copy paste the example or just rename the example to avoid any mistake if you are new to this kind of file or in development in general.
if you want more information about how JSON works I recommends you to read Mozilla MDN about JSON files.

Have a nice day!

@Asthriona
Copy link
Owner

Just noticed there are no closing brackets at the end. every single opening tag MUST be closed.
I strongly suggest that you read what @Heazher sent. also, I would add the JavaScript one if you really want to learn how NodeJS works.

@coco66688
Copy link
Author

??

@Asthriona
Copy link
Owner

Asthriona commented Oct 24, 2020

@sam920829 can you be more precise?
you need to know we need you to help us to help you, give more information, because "??" don't tell me what's wrong or what you didn't understand.
logs is fine, but we don't see your screen we can't tell what's wrong without knowing what you do and a simple "??" don't tell us what's wrong or what you didn't understand at all.

so please be more cooperative with the devs and you will gain a lot of time and make us win a lit if time as well.
Thanks.

@azmerhos
Copy link
Collaborator

azmerhos commented Oct 24, 2020

Correct code :
{
"token": "......................................................................................",
"prefix": "a!",
"YtKey": "AIzaSyDUTJS4N3YVg9Nd5XXOEC2vHs9LTIa6Zcs",
"dbLink": "mongodb+srv:https://USERNAME:[email protected]/discordbot?retryWrites=true&w=majority"
}

Differences : comma ( , ) at every end line except the last, and bracket close ( } ) at the end of the botconfig.json. Those things aren't present in what you shared here.

For resume what @Heazher and @Asthriona suggest.

If you have error again please say it and they will can consider there is another error somewhere

@coco66688
Copy link
Author

SyntaxError: C:\Users\user\Downloads\Yukiko-master\Yukiko-master\botconfig.json: Unexpected token } in JSON at position 261
at parse ()
�[90m at Object.Module._extensions..json (internal/modules/cjs/loader.js:1106:22)�[39m
�[90m at Module.load (internal/modules/cjs/loader.js:928:32)�[39m
�[90m at Function.Module._load (internal/modules/cjs/loader.js:769:14)�[39m
�[90m at Module.require (internal/modules/cjs/loader.js:952:19)�[39m
�[90m at require (internal/modules/cjs/helpers.js:88:18)�[39m
at Object. (C:\Users\user\Downloads\Yukiko-master\Yukiko-master\index.js:2:17)
�[90m at Module._compile (internal/modules/cjs/loader.js:1063:30)�[39m
�[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)�[39m
�[90m at Module.load (internal/modules/cjs/loader.js:928:32)�[39m

C:\Users\user\Downloads\Yukiko-master\Yukiko-master>pause

@Asthriona
Copy link
Owner

Okay, I'm not sure you read us at this point.
@azmerhos Gave you a fully functional configuration, @Heazher Gave you all the details, and I explain to you we need more information
again logs are helpful, but I can't see your screen, nor what you did. please give us more information on what you did, the entire file so we can start to help you.

Please be a bit more cooperative.
Thank you.

@azmerhos
Copy link
Collaborator

azmerhos commented Oct 25, 2020

How looks your botconfig.json now ? Cause the problem is there again but different than the first time. But always a Syntax error. We can't help you without see it

@Heazher
Copy link
Collaborator

Heazher commented Nov 3, 2020

I'm closing for inactivity.

@Heazher Heazher closed this as completed Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants