Hi. Out of nowhere my bots started to get offline.
seems that they can’t find discord.js . Is there any reasons glitch will uninstall discord.js from my project ?
I had the same problem with my first discord bot here on glitch. I thought was something from glitch servers so i waited 2 weeks , but nothing happened. My bot was still offline. Then I typed “npm install discord.js” in the console and my bot started working again. Today the other 2 bots are getting the same error.
What causing this and how can i prevent this in the future ?
I will not run npm install discord.js this time, if the glitch support wants to take a look at my project to see what causing this behavior
npm ERR! JSON.parse Unexpected end of JSON input while parsing near ‘’
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npm-cache/10.15.3/_logs/2019-06-28T08_38_39_926Z-debug.log
By the looks of it, you have a formatting issue in your package.json. Nothing will work until that’s resolved. If you can share your project name I’ll take a look.
The name in package.json contained a space, which isn’t valid. With that updated the project is working again. Although you get an error due to an invalid token. For some reason you had 3 .env files in your project. If you add the variables and token to the 1 remaining .env file, then it should resolve that issue.
There’s nothing obvious in the code, and you should see any changes made in Rewind, except it doesn’t show anything new since 3 days ago.
Do you still get the same problem if you switch between projects while in an incognito or private browsing window? The projects have space, so it could be a browser plugin issue.
When i switch between projects, i dont need to be with point of view at .env file and it will save. Seems i just have click another file before i switch to another project
Het @r8link you were seeing the effects of the problem we mentioned in Some project .env files reset. Sorry for the bother, and glad everything’s working as expected now!