Skip to content

Tag: node.js

Node js Uncaught SyntaxError: Unexpected identifier

When I call node filename.js then it return an error.(Uncaught SyntaxError: Unexpected identifier). How can I fix it? Thanks Answer You are inside the node command mode after you type node, you should quit with Ctrl + C and you only need to run your js file in the terminal with node jsfile.js instead of runni…

How can I check if an EJS variable exists?

I used EJS layout in my Node.js application. Currently I faced a problem when data which is required in the EJS file is not available then it simply generate an error. What I want is to add a condition before using the EJS variable in javascript. Here is my code in which I use EJS variable inside script tag. …

Shard Dying Over and Over Discordjs

I am trying to shard my bot in discord.js. Client.js is my bot.js file I have this code in my index.js file to shard But I keep getting this error: (node:27636) UnhandledPromiseRejectionWarning: Error [SHARDING_READY_DIED]: Shard 0’s process exited before its Client became ready. I need some help on sha…