Open skgupta507 opened 3 weeks ago
did you fork the latest commit?
I changed my database, I'm using postgresql you can create one in neon.tech, also I update the next-auth im using the v5 change the environment variables with AUTH_SECRET instead
make sure you add those environment variables in your deployment settings
I did that but it still shows the error But I have a doubt The next api url and anime api url Should I use the same api link for both of them.
yeah it's the same url
yeah it's the same url
after re-entering all the env variables the issue still is there.
is there anything else i shuld solve or change
just make the following changes in the environment variables part
NEXT_PUBLIC_APP_URL=http://localhost:3001/
to
NEXT_PUBLIC_APP_URL=http://localhost:3000/
@benjoquilario Even tho i am having the correct set of environment variables and after running
npm i --legacy-peer-deps
when i go ahead for npm run dev
animehi@1.2.0 dev next dev
❌ Invalid environment variables: { AUTH_SECRET: [ 'Required' ] } file:///workspace/animehi-stream/node_modules/@t3-oss/env-core/dist/index.js:29 throw new Error("Invalid environment variables"); ^
Error: Invalid environment variables at onValidationError (file:///workspace/animehi-stream/node_modules/@t3-oss/env-core/dist/index.js:29:15) at createEnv (file:///workspace/animehi-stream/node_modules/@t3-oss/env-core/dist/index.js:35:16) at createEnv (file:///workspace/animehi-stream/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12) at file:///workspace/animehi-stream/src/env.mjs:4:20 at ModuleJob.run (node:internal/modules/esm/module_job:222:25) at async ModuleLoader.import (node:internal/modules/esm/loader:316:24) at async loadConfig (/workspace/animehi-stream/node_modules/next/dist/server/config.js:698:36) at async Module.nextDev (/workspace/animehi-stream/node_modules/next/dist/cli/next-dev.js:175:14)
Node.js v20.13.1
What am i doing wrong ?
hey @benjoquilario thanks for the help
i found out the issue.
the error was occuring due to the database tables not being created.
i had forgot run the command to create the database tables.
pnpm prisma db push
can u maybe add this to the readme of the projects so that new user do this during their deployment.
I was having the same issue where nothing is showing on the website after deploying, created a database from neon.tech and now its not deploying anymore
@benjoquilario Even tho i am having the correct set of environment variables and after running
npm i --legacy-peer-deps
when i go ahead for npm run dev
animehi@1.2.0 dev next dev
❌ Invalid environment variables: { AUTH_SECRET: [ 'Required' ] } file:///workspace/animehi-stream/node_modules/@t3-oss/env-core/dist/index.js:29 throw new Error("Invalid environment variables"); ^
Error: Invalid environment variables at onValidationError (file:///workspace/animehi-stream/node_modules/@t3-oss/env-core/dist/index.js:29:15) at createEnv (file:///workspace/animehi-stream/node_modules/@t3-oss/env-core/dist/index.js:35:16) at createEnv (file:///workspace/animehi-stream/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12) at file:///workspace/animehi-stream/src/env.mjs:4:20 at ModuleJob.run (node:internal/modules/esm/module_job:222:25) at async ModuleLoader.import (node:internal/modules/esm/loader:316:24) at async loadConfig (/workspace/animehi-stream/node_modules/next/dist/server/config.js:698:36) at async Module.nextDev (/workspace/animehi-stream/node_modules/next/dist/cli/next-dev.js:175:14)
Node.js v20.13.1
@flawsom use this 0da6c93385b73b6901d84f32148b6dd3
as the auth_secret variable
Then it should work or u can generate a new one from here https://generate-secret.vercel.app.
I was having the same issue where nothing is showing on the website after deploying, created a database from neon.tech and now its not deploying anymore
Hey @InstaTechHD after creating the database u need to run the command pnpm prisma db push
in local machine. so that it creates the required tables for the database to work if not its empty (no tables in there).
once u run the above command. Redeploy the site and it shuld work properly.
This Issiue occurs when the prisma schema was not able to create any tables in the database. which can be created with the pnpm prisma db push
command.
try it out n let us know if it works for u or not.
Hey @benjoquilario can u help me with issue for which i have attached the screenshot. on my deployed site it shows smething went wrong instead of the anime showing.![image](https://github.com/benjoquilario/animehi-stream/assets/131786207/a2ee1c63-148e-45a4-a845-5e9afe7a9bb9)
https://animehi-streamx.vercel.app this is my hosted instance. can u pls help me with the solution