Glitch problem i need help

/rbd/pnpm-volume/a59eb290-9214-4387-919d-31771de551fc/node_modules/.registry.npmjs.org/discord.js/12.3.1/node_modules/discord.js/src/client/Client.js:41

11:58 AM

} catch {

11:58 AM

^

11:58 AM

11:58 AM

SyntaxError: Unexpected token {

11:58 AM

at createScript (vm.js:80:10)

11:58 AM

at Object.runInThisContext (vm.js:139:10)

11:58 AM

at Module._compile (module.js:617:28)

11:58 AM

at Object.Module._extensions…js (module.js:664:10)

11:58 AM

at Module.load (module.js:566:32)

11:58 AM

at tryModuleLoad (module.js:506:12)

11:58 AM

at Function.Module._load (module.js:498:3)

11:58 AM

at Module.require (module.js:597:17)

11:58 AM

at require (internal/module.js:11:18)

11:58 AM

at Object. (/rbd/pnpm-volume/a59eb290-9214-4387-919d-31771de551fc/node_modules/.registry.npmjs.org/discord.js/12.3.1/node_modules/discord.js/src/index.js:8:11)

this is my problem

It sounds like a simple syntax error. Can you share the code so we can take a look at it? Also, I’m going to recategorise this to coding help as its not about Glitch specifically.

Hey @TaktikBey ,

Try changing the Node version in your package.json to 12.x.

"engines": {
 "node": "12.x" 
},
1 Like

`Uncaught Promise Error: TypeError: Discord.RichEmbed is not a constructor

12:46 PM

Jump Toat module.exports (/app/events/ready.js:29:19)

12:46 PM

at processTicksAndRejections (internal/process/task_queues.js:88:5)

12:46 PM

Uncaught Promise Error: Error: 400 Bad Request

12:46 PM

at IncomingMessage. (/rbd/pnpm-volume/5fc92e5e-2656-4adc-82d6-d63aa92065fb/node_modules/.registry.npmjs.org/dblapi.js/2.4.1/node_modules/dblapi.js/src/index.js:118:25)

12:46 PM

at IncomingMessage.emit (events.js:201:15)

12:46 PM

at endReadableNT (_stream_readable.js:1130:12)

12:46 PM

at processTicksAndRejections (internal/process/task_queues.js:83:17) {

12:46 PM

raw: ‘{“error”:“Required parameter server_count or shards missing”}’,

12:46 PM

body: { error: ‘Required parameter server_count or shards missing’ },

12:46 PM

status: 400,

12:46 PM

headers: {

12:46 PM

date: ‘Sat, 22 Aug 2020 09:46:13 GMT’,

12:46 PM

‘content-type’: ‘application/json; charset=utf-8’,

12:46 PM

‘content-length’: ‘61’,

12:46 PM

connection: ‘close’,

12:46 PM

‘set-cookie’: [

12:46 PM

'__cfduid=d03722fdbbf4630a095e09eb790d1f6c41598089573; ’ +

12:46 PM

'expires=Mon, 21-Sep-20 09:46:13 GMT; path=/; ’ +

12:46 PM

‘domain=.top.gg; HttpOnly; SameSite=Lax; Secure’

12:46 PM

],

12:46 PM

‘x-powered-by’: ‘Express’,

12:46 PM

‘access-control-allow-origin’: ‘*’,

12:46 PM

‘access-control-allow-headers’: ‘Authorization’,

12:46 PM

etag: ‘W/“3d-AG5DMcRAr7VonaedOjpOtCEaVnk”’,

12:46 PM

‘x-cacheable’: ‘NO’,

12:46 PM

‘x-varnish’: ‘257950827’,

12:46 PM

age: ‘0’,

12:46 PM

via: ‘1.1 varnish-v4’,

12:46 PM

‘cf-cache-status’: ‘DYNAMIC’,

12:46 PM

‘cf-request-id’: ‘04b728cb1400000d9e0d3e9200000001’,

12:46 PM

‘expect-ct’: 'max-age=604800, ’ +

12:46 PM

‘report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”’,

12:46 PM

‘strict-transport-security’: ‘max-age=15552000; includeSubDomains; preload’,

12:46 PM

‘x-content-type-options’: ‘nosniff’,

12:46 PM

server: ‘cloudflare’,

12:46 PM

‘cf-ray’: ‘5c6baa5829500d9e-IAD’

12:46 PM

},

12:46 PM

ok: false,

12:46 PM

statusText: ‘Bad Request’

12:46 PM

}`

@TaktikBey instead of Discord.RichEmbed, try using Discord.MessageEmbed.

1 Like

Since all the issues you are facing are due to changing from Discord.js v11 to Discord.js v12, I would recommend checking out the full list of changes.

1 Like