Scott-778/coinmarketcap-sniper-bot

Uncaught SyntaxError: Unexpected token ':'

richard-p9 opened this issue · 5 comments

I've only changed the info that was necessary on the file in the comments, and ran it through node. It came up with the "Uncaught SyntaxError: Unexpected token ':'" error. I tried to look through the code and couldn't find the issue, ran it through VB for debug and still have the issue but it's not highlighted under any specific line as an error.
syntax error

You must have deleted something when you were filling it in. Check that your wallet address is in between quotes and also look at the end of lines where you edited and make sure they end with ; instead of :

It looks like the error might be from the command you entered in the command prompt. Try using cd C:\Users\your file location. Then node cmcBot.js

It was the command that was incorrect, now it's coming up with an error that I put in an incorrect depot which is:

"Uncaught SyntaxError: Identifier 'TelegramClient' has already been declared."

Aside from the: const {TelegramClient} = require("telegram"); code the only other code that references TelegramClient is:
const client = new TelegramClient(stringSession, apiId, apiHash, {
connectionRetries: 5,

syntax error

The only thing it can be is that there are two const {TelegramClient} = require("telegram"); try deleting one and saving the file when you are done. Are you editing the file with the command prompt?