How to set main file [express]

Hi, I just Designed a music bot for Discord, but there is a problem with the main file (i think)

The log throws up this, and I don’t know what to do. If it’s an issue about main file, how can I set it? (I removed server.js and opened main.js at the beginning)

Error: at Function.Module.runMain (internal/modules/cjs/loader.js:826:10) 11:56 PM

PS: Project is private, but I will open it if needed.

Regards,
TecDeveloper

Please attach the full error.

Oh, show us some code so we can debug it more!

No, just show us code

image here is the full error. But music code is so long to send. If really needed I’m gonna hide the token and unlock my project.

Actually, you should hide the token in .env and use the dotenv lib.

Just a little suggestion, you can put your token in a .ENV file, so only project members can view the code.

2 Likes

Like I said, I would use .env(makin it)

I know, but the project was already locked + this is my alt project

Duplicate answer, as I’ve said about the .env and the dotenv lib.

Just to clarify, you can have a public project and users will not be able to see your token unless they become a project member.

We just want your token to stay safe, because there are some bad people on the forum.

Like on @javaarchive’s MediaWiki project when someone put “this bad word this bad word”

I know .env lib, I just didn’t deal with it because it’s already private*

Thanks for thinking it :slight_smile:

Just solved myself. Sorry for taking time, the only think needed was an upgrade to package.json

We will need a the full logs to solve it.