dvd545
TTCTheo's Typesafe Cult
•Created by dvd545 on 11/14/2023 in #questions
Does it improve SEO? (getStaticProps vs import data from "src/folder/data-file")
I import my data from a folder in the same src folder in nextjs, ie. I write (import data from "~/data-folder/pokemon-details.json";) at the top of a page.
Would it improve my SEO if i use getStaticProps? I only see examples with external databases so I was curious on this.
6 replies
TTCTheo's Typesafe Cult
•Created by dvd545 on 7/6/2023 in #questions
Deployment error with working environment variable
I'm trying to deploy on vercel and i got this error below. I can call the OpenAI API (via server side/ api folder). And I've already filled up the env.mjs file. I did not edit the next.config.mjs as the t3 docs did not say anything about editing it.
I've tried searching online and can't find any resource on it. (Fyi, my stack is t3 without trpc and nextauth. Also, I'm using pages router.)
Do let me know if you need any more information.
Below is my error:
❌ Invalid environment variables: { OPENAI_API_KEY: [ 'Required' ] }
- error Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error
Build error occurredError: Invalid environment variables at f (file:///vercel/path0/node_modules/@t3-oss/env-nextjs/dist/index.mjs:1:505) at l (file:///vercel/path0/node_modules/@t3-oss/env-nextjs/dist/index.mjs:1:695) at C (file:///vercel/path0/node_modules/@t3-oss/env-nextjs/dist/index.mjs:1:868) at file:///vercel/path0/src/env.mjs:4:20 at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
4 replies