Hosting Not Working

I can’t host my bot on glitch i keep getting this error.

Check /app/package.json: it has syntax errors, install won’t proceed.
parse error: Expected separator between values at line 12, column 29.

Here is my code if anybody want to help.

{
“name”: “discord-bot-maker-bot”,
“author”: “Robert Borghese”,
“main”: “bot.js”,
“version”: “1.6.9”,
“dependencies”: {
“discord.js”: “^12.2.0”,
“fstorm”: “latest”,
“jimp”: “latest”,
“node-cron”: “^2.0.3”,
“request”: “^2.88.2”
“express-glitch-keepalive”: “^0.2.0”,
“express”: “^4.16.4”
}
“scripts”: {
“start”: “node bot.js”
},
}

Add a comma to the end of this line.

1 Like

Also, remove the comma from the 2nd to last line.

Check out https://beautifier.io - it can help you find missing commas and such.


Like what @RiversideRocks said - there’s no comma after request, so the line breaks are funny.

Also I didn’t know “latest” is a valid version number :thinking:

2 Likes

Thats a simple fix to do. I fixed up for you;

“name”: “discord-bot-maker-bot”,
“author”: “Robert Borghese”,
“main”: “bot.js”,
“version”: “1.6.9”,
“dependencies”: {
“discord.js”: “^12.2.0”,
“fstorm”: “latest”,
“jimp”: “latest”,
“node-cron”: “^2.0.3”,
“request”: “^2.88.2”,
“express-glitch-keepalive”: “^0.2.0”,
“express”: “^4.16.4”
}
“scripts”: {
“start”: “node bot.js”
},
}

This was already solved

2 Likes

Hello SplitXPlay When i put in you’re code i get this error message
parse error: Invalid numeric literal at line 1, column 11

You code was correct, don’t use their code. All you had to do was add a comma after request.

2 Likes

{
“name”: “discord-bot-maker-bot”,
“author”: “Robert Borghese”,
“main”: “bot.js”,
“version”: “1.6.9”,
“dependencies”: {
“discord.js”: “^12.2.0”,
“fstorm”: “latest”,
“jimp”: “latest”,
“node-cron”: “^2.0.3”,
“request”: “^2.88.2”,
“express-glitch-keepalive”: “^0.2.0”,
“express”: “^4.16.4”
}
“scripts”: {
“start”: “node bot.js”
},
}

This is the new code but i get this error

Check /app/package.json: it has syntax errors, install won’t proceed.

parse error: Invalid numeric literal at line 2, column 11

{
“name”: “discord-bot-maker-bot”,
“author”: “Robert Borghese”,
“main”: “bot.js”,
“version”: “1.6.9”,
“dependencies”: {
“discord.js”: “^12.2.0”,
“fstorm”: “latest”,
“jimp”: “latest”,
“node-cron”: “^2.0.3”,
“request”: “^2.88.2”,
“express-glitch-keepalive”: “^0.2.0”,
“express”: “^4.16.4”
},
“scripts”: {
“start”: “node bot.js”
},
}

1 Like

lol, another missing comma

I Still get this error

Check /app/package.json: it has syntax errors, install won’t proceed.

parse error: Invalid numeric literal at line 2, column 11

Could you please share your current package.json file?

1 Like

Yeah sure.
Can’t send it cuz it is an json file so here’s da code.

{
“name”: “discord-bot-maker-bot”,
“author”: “Robert Borghese”,
“main”: “bot.js”,
“version”: “1.6.9”,
“dependencies”: {
“discord.js”: “^12.2.0”,
“fstorm”: “latest”,
“jimp”: “latest”,
“node-cron”: “^2.0.3”,
“request”: “^2.88.2”,
“express-glitch-keepalive”: “^0.2.0”,
“express”: “^4.16.4”,
},
“scripts”: {
“start”: “node bot.js”
},
}

{
“name”: “discord-bot-maker-bot”,
“author”: “Robert Borghese”,
“main”: “bot.js”,
“version”: “1.6.9”,
“dependencies”: {
“discord.js”: “^12.2.0”,
“fstorm”: “latest”,
“jimp”: “latest”,
“node-cron”: “^2.0.3”,
“request”: “^2.88.2”,
“express-glitch-keepalive”: “^0.2.0”,
“express”: “^4.16.4”,
},
“scripts”: {
“start”: “node bot.js”
}
}

hold on. Ima get one from the project.

Also, just a heads up that you should remove this package (npm remove express-glitch-keepalive) as you will probably get your project banned if you keep this here.

2 Likes

It will only be banned by the use of it. I have it in a project that I forgot it was in there and it didn’t get banned. Also, Glitch blocks those requests.

Still get

parse error: Invalid numeric literal at line 2, column 11

Try making a new node project, then add the packages and coping it.