Open coombsj opened 6 months ago
I fixed this issue by simply updating discord environment variables like shown below in .env
file:
DISCORD_CLIENT_ID="sample"
DISCORD_CLIENT_SECRET="sample"
Also, you can fix it via making discord env values optional in env.js
file:
DISCORD_CLIENT_ID: z.string().optional(),
DISCORD_CLIENT_SECRET: z.string().optional(),
I believe there is a section in the "First Steps" part of create-t3-app's documentation that addresses this issue. Look under "Authentication": https://create.t3.gg/en/usage/first-steps
Provide environment information
System: OS: macOS 11.7.10 CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz Memory: 148.06 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 21.7.1 - /usr/local/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 10.5.0 - /usr/local/bin/npm pnpm: 8.15.5 - ~/Library/pnpm/pnpm
"ct3aMetadata": { "initVersion": "7.30.0" }
Describe the bug
npm run dev
❌ Invalid environment variables: { DISCORD_CLIENT_ID: [ 'Required' ], DISCORD_CLIENT_SECRET: [ 'Required' ] }
Node.js v21.7.1
Reproduction repo
Part of setting up the project nothing to deploy yet.
To reproduce
Ran
npm create t3-app@latest
to create new app with the following selections:Followed next steps provided: cd test-app npm run db:push npm run dev
Additional information
Suggestion to enhance next steps section to include something about setting environment variables when using NextAuth.