discord-live-translator
discord-live-translator copied to clipboard
.env: The system cannot find the file specified
Clony the repository. I used the terminal to specify the path to the folder: cd C:\Users\c920\discord-live-translator-main.
In the path: discord-live-translator-main\src. I've customized the env.ts file.
import { createEnv } from '@t3-oss/env-core';
import dotenv from 'dotenv';
import { z } from 'zod';
dotenv.config();
const env = createEnv({
clientPrefix: 'PUBLIC_',
client: {},
server: {
BOT_TOKEN: z.string(********),
CLIENT_ID: z.string(***********).optional(),
GUILD_ID: z.string().optional(),
LOG_PATH: z.string().optional(),
REDIS_URL: z.string().optional(),
STT_HOST: z.string(),
TRANSLATION_HOST: z.string()
},
runtimeEnv: process.env
});
export default env;
I run the bot and get an error
C:\Users\c920\discord-live-translator-main> docker compose -f docker-compose.prod.yml up -d Failed to load C:\Users\c920\discord-live-translator-main.env: open C:\Users\c920\discord-live-translator-main.env: The system cannot find the file specified.
Please help solve the problem
I believe what is going on here are two things:
- If you modify the code but use the production Docker Compose file, the prebuilt container images hosted on GitHub will be used rather than using your version
- You've modified
env.ts
to configure your env. Instead you need to create a new file named.env
- you can find a newly added.env.example
in the repo, which you can use as a starting point
Seems to be resoved!
Yes. Thank you!