May I ask why my .env is out of order and I cannot use process.env.token
It is not recommended to use
.env files in the Replit. Secrets should be used instead. Perhaps that’s why you are having these errors.
I believe Replit prevents use of
.env files as a security measure, so bad actors can’t get ahold of your API keys and etc.
You should use environment variables instead like @KAlexK suggested.