I want to host my discord bot on glitch.
But the console keeps sending me an error, but that error isn’t there.
The error says always that i have a type fault. But when i change that. The same error comes up again.
So I tried to refresh the page and change the fault but that doesn’t help. It always says the same error, over and over again. When i change it to what it needs to be it is still giving that error. Then if I refresh the page it has changed my index.js file to what the error said. It keeps going on and on.
Thanks for reporting. It would be helpful if you could let us know the specific message of the error you’re seeing and the name of your project. If your project is private, then either make it public or DM me a join link so I can take a look. Thanks.
How can I send you the link in DM because I just started out using glitch. Oh and this is the error:
let xp = require(json")jrange);
^^^^^^^^^^
SyntaxError: Invalid or unexpected token
at new Script (vm.js:51:7)
at createScript (vm.js:136:10)
at Object.runInThisContext (vm.js:197:10)
at Module._compile (internal/modules/cjs/loader.js:618:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
at startup (internal/bootstrap/node.js:201:19)
It looks like you had a lone 0x0d character in your file somehow, and that confused the editor. I deleted that character, and now I seem to be able to edit your index.js without the problem showing up.
It turns out that wasn’t the whole story. It looks like your files were in Windows format, so their line endings were wrong, which confuses our editor. You can run dos2unix <filename> in the console to fix a file.
I did this for all of your files, and things seem to be working. I’ll also fix this problem so that they get converted automatically in the future.