max_data
TTCTheo's Typesafe Cult
•Created by max_data on 8/16/2023 in #questions
Deploying to Vercel - now errors with build and dev part 2
This is part 2, the error message
==== This is the output running either pnpm dev or build
- info Loaded env from /Users/isrd1/Dropbox/web/react/t3/blog-t3-app2/.env.local
- info Loaded env from /Users/isrd1/Dropbox/web/react/t3/blog-t3-app2/.env
❌ Invalid environment variables: { NEXTAUTH_URL: [ 'String must contain at least 1 character(s)' ] }
- 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 T.m (file:///Users/isrd1/Dropbox/web/react/t3/blog-t3-app2/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@t3-oss/env-nextjs/dist/index.mjs:1:500) at T (file:///Users/isrd1/Dropbox/web/react/t3/blog-t3-app2/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@t3-oss/env-nextjs/dist/index.mjs:1:690) at P (file:///Users/isrd1/Dropbox/web/react/t3/blog-t3-app2/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@t3-oss/env-nextjs/dist/index.mjs:1:1081) at file:///Users/isrd1/Dropbox/web/react/t3/blog-t3-app2/src/env.mjs:4:20 at ModuleJob.run (node:internal/modules/esm/module_job:192:25) at async DefaultModuleLoader.import (node:internal/modules/esm/loader:228:24) at async file:///Users/isrd1/Dropbox/web/react/t3/blog-t3-app2/next.config.mjs:5:1 ELIFECYCLE Command failed with exit code 1.
1 replies
TTCTheo's Typesafe Cult
•Created by max_data on 8/16/2023 in #questions
Deploying to Vercel - now errors with build and dev part 1
I've been developing a T3 app, using first MySQL in Docker and then Postgres in Docker without any problems or errors. But I finally got around to trying to deply to Vercel, something I should have been doing from the start but hey ho.
The setup seemed straightforward but, having followed the vercel setup instructions and imported the .env, .env.local and .env.development.local I now get errors when I run pnpm dev or pnpm build. Both complain that there are invalid environmental variables, NEXTAUTH_URL, even though that variable is there and it was working fine before the import of other variables. Might anyone know the cause of the problem please? Post split into two parts ==== this is the made safe for publishing version of my .env files DATABASE_URL="postgres://default:[email protected]/verceldb" DISCORD_CLIENT_ID="123456789” DISCORD_CLIENT_SECRET=“secretsecret" NEXTAUTH_SECRET=“XXXXXXXXXXXXXX” NEXTAUTH_URL="http://localhost:3000" NX_DAEMON="" POSTGRES_DATABASE="verceldb" POSTGRES_HOST=“servername.postgres.vercel-storage.com" POSTGRES_PASSWORD=“XXXXXXXX” POSTGRES_PRISMA_URL="postgres://default:[email protected]/verceldb?pgbouncer=true&connect_timeout=15" POSTGRES_URL="postgres://default:[email protected]/verceldb" POSTGRES_URL_NON_POOLING="postgres://default:[email protected]/verceldb" POSTGRES_USER="default"
The setup seemed straightforward but, having followed the vercel setup instructions and imported the .env, .env.local and .env.development.local I now get errors when I run pnpm dev or pnpm build. Both complain that there are invalid environmental variables, NEXTAUTH_URL, even though that variable is there and it was working fine before the import of other variables. Might anyone know the cause of the problem please? Post split into two parts ==== this is the made safe for publishing version of my .env files DATABASE_URL="postgres://default:[email protected]/verceldb" DISCORD_CLIENT_ID="123456789” DISCORD_CLIENT_SECRET=“secretsecret" NEXTAUTH_SECRET=“XXXXXXXXXXXXXX” NEXTAUTH_URL="http://localhost:3000" NX_DAEMON="" POSTGRES_DATABASE="verceldb" POSTGRES_HOST=“servername.postgres.vercel-storage.com" POSTGRES_PASSWORD=“XXXXXXXX” POSTGRES_PRISMA_URL="postgres://default:[email protected]/verceldb?pgbouncer=true&connect_timeout=15" POSTGRES_URL="postgres://default:[email protected]/verceldb" POSTGRES_URL_NON_POOLING="postgres://default:[email protected]/verceldb" POSTGRES_USER="default"
4 replies
TTCTheo's Typesafe Cult
•Created by max_data on 6/20/2023 in #questions
Why differences between t3 App and tRPC starter app?
I'm relatively new to using React and quickly adopted Typescript and NextJS having been inspired by Theo, Jack Herrington and Dave Gray. I converted a blog type web using php into one using NextJS 13 and I've now done a version using the T3 App; so I'm moving forward in my learning. I must say I very much like the app version of nextjs to the pages version and so am keen to keep an eye on T3 version in case that changes to the now production ready nextjs 13.
In checking versions I followed a link to the tRPC github site where I notice there's a version using nextjs, prisma, so I installed that version and the latest T3. I notice there are quite a few differences one of the most striking is the differences in directory structure of the server/ directories. Some files have the same code but are named differently, other files are different in name and content or implementation (server/api/root.ts vs server/routers/_app.ts in t3-app and trpc-prisma-starter respectively).
Is T3 and tRPC only loosely connected or is tRPC simply moving faster than T3? Can anyone point me in the right direction please?
8 replies