Jacob
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Jacob on 10/7/2024 in #questions
Types not matching up when exporting AppType for Hono???
2 replies
CDCloudflare Developers
•Created by Jacob on 9/17/2024 in #pages-help
Getting 500 internal server error - Nextjs
For some reason my application is getting 500 errors when deployed, works fine when building and running locally but fails in production.
When i check the logs i get this:
The build logs seem to be totally fine so not sure what is up
Links:
https://github.com/jacobsamo/buzztrip
https://buzztrip.co
https://buzztrip.pages.dev
https://0c1dc957.buzztrip.pages.dev
1 replies
CDCloudflare Developers
•Created by Jacob on 9/9/2024 in #pages-help
Configuring a monorepo
So i am looking to configure a monorepo for Cloudflare Pages, i have a Nextjs app under
/apps/web
which will need @cloudflare/next-on-pages
to build. However i can't figure out how to get it all working.
My repo: https://github.com/jacobsamo/BuzzTrip2 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 9/4/2024 in #questions
Failing to connect to local d1 db with drizzle
So i am having trouble setting up drizzle with cloudflare d1 and i'm not sure why i am running into issues:.
When running
bun drizzle-kit migrate
i receive the following error:
I have attached my drizzle.config.ts
below,
Anyone have any ideas on why it might be failing??3 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 9/3/2024 in #questions
Best image service provider
So i want to store and serve images for a personal maps projects for an alternative to Google My Maps, i want to store images of places in a bucket of sorts and would perfer to not pay as i don't plan for it scale any large than myself and a small group of people.
Any recommendations? i will be storing quite a large amount of photos as each marker on the map will probably have 3 - 15 images depending on the place.
Solutions i have had a small look into:
- Uploadthing - 2Gb free tier (amazing service and love it very much)
- Supabase - 1GB free
- R2 storage - 10GB free
- S3 - 5GB free
- Google Cloud storage - 5GB free
Does anyone know of any better services?
my app will probably be running on Cloudflare pages and using the Google Maps SDK
2 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 8/12/2024 in #questions
What's the best logging service for nextjs?
I am currently looking for a good logging service for my nextjs application, i have gone and tried axiom which i liked however reading through things seemed to run pretty slow in server function with having to clean up afterwards (flushing).
I am currently using posthog for my analytics which i really love.
I was wondering what are some good solutions for logging? as i am not on the vercel pro/enterprise plan so log drains are no longer available.
Solutions i have had a bit of a look at:
- axiom
- sentry
- baselime
2 replies
CDCloudflare Developers
•Created by Jacob on 8/4/2024 in #pages-help
Bun failing builds
I want to use bun to run my cloudflare builds however it fails every time and not sure why, this is my stack trace:
I have removed the
bun.lockb
and added to .gitignore
beacuse that too was failing now it is set through package.json
with this line: "packageManager": "[email protected]"
not sure how to fix this7 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 6/27/2024 in #questions
Vercel server environment variables not pulling in
I am currently using using T3 Env for type safe environment variables however on vercel it seems that the server environment variables aren't pulling in for some reason. it builds fine in locally and builds fine using the Vercel CLI using
vercel pull
and vercel build
.
I have checked that my environment variables are correct in my settings and they are and are set for the right environments.
This is the error I see:
the repo can be found here: https://github.com/jacobsamo/Mixie/tree/HOT-FIX-typescript-env-errors
also logged on vercel discussions: https://github.com/orgs/vercel/discussions/73112 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 6/25/2024 in #questions
Connecting to websockets in app router
I am looking to build an application that does the following:
- connect to zoom
- get users from zoom
- subscribe to their status
I can’t find anything on websockets for nextjs app router.
Does anyone know how I would do this?
Would prefer to subscribe on the server best solution i got is to wrap the layout in a client component and the client component gets the users and subscribes to the status however this would be slow
5 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 6/15/2024 in #questions
best way to add an admin portal following best practices
Hi all, i am wanting to add a admin portal to my application https://mixiecooking.com/ this portal would be used for adding blogs, updating privacy policy, terms of service, etc.
I am wondering what the best way to do this would be, some options i have thought about
- adding the portal as
/admin
- At [userId]/admin
- using a subdomain such as admin.mixiecooking.com
however this requires a whole other application to be built and maintained
My setup is using a monorepo, project can be found here https://github.com/jacobsamo/Mixie
What would the best way to build this?2 replies
CDCloudflare Developers
•Created by Jacob on 2/24/2024 in #pages-help
build exceeding memory limit
so i have a pretty large nextjs application and it builds fine without having
export const runtime = "edge";
set however once i set this in my layout.tsx
it maxs out for some reason
3 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 2/17/2024 in #questions
Creating beautiful product videos
As i am coming up to my product lanuch for my application https://www.mixiecooking.com/ and other small products that i would like to launch into the future.
I want to create beautiful product videos for them but i'm not sure how to.
does anyone know how to?
6 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 12/13/2023 in #questions
How to dynamically display icons
So in my app i want to dynamically display icons from a
string[]
but it doesn't seem to want to work, the icons show in the html but are transparent on the page.
the icon component:
then this is my component rendering the icons:
Is this something i am missing?2 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 11/17/2023 in #questions
Running into webpack issues for `generateComponents` _uploadthing_react__WEBPACK_IMPORTED_MODULE_0__
I am for some reason running into this webpack issue and i don't know why it was working yesterday.
package versions:
"next": "^14.0.3",
, "uploadthing": "^6.0.1"
4 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 11/15/2023 in #questions
Email aren't sending in production
so i am using nextauth for my authentication as part of this users can signin using an email, this will then send them an email with the login code or a link to signin. these emails send in both dev and prod enviorments locally, but won't send on vercel.
these are the logs:
2 replies
DTDrizzle Team
•Created by Jacob on 11/3/2023 in #help
[BUG]: React Hook Form doesn't submit when using drizzle-zod to create schemes to use in zodResolver
When using
drizzle-zod
to generate schemas from database schemas and using them in the useForm
resolvers the onSubmit won't fire at all for some reason,
So for example:
and then using it in the useForm
in this example when you click the Submit
from the form it doesn't work at all.
however if you build your own schema using zod it works fine.
For reference this was working about a about a week ago.
No errors show in the browser console or terminal, so i don't know what is up there
I have posted issues on react-hook-form
and drizzle-orm
however I'm not sure which team is that the problem is coming from
https://github.com/react-hook-form/resolvers/issues/642
https://github.com/drizzle-team/drizzle-orm/issues/1448
To Reproduce
Steps to reproduce the behavior:
1. create a schema using zod
2. create a zod schema using drizzle-zod
and createInsertSchema
3. import that schema into a useForm
resolver
4. try submitting the form (should not work)
Codesandbox link
very simple application that doesn't seem to submit:
https://codesandbox.io/p/sandbox/react-hook-form-zod-resolver-not-working-9c7qn9
Environment & setup
Operating systems that is is occuring in:
- Mac ventura 13.5.2,
- Windows 10
- Windows 11
- Codesandbox
Browsers:
- Chrome
Versions of packages:
- react-hook-form
: 7.47.0
- @hookform/resolvers
: 3.3.2
- drizzle-orm
: 0.28.6
- drizzle-zod
: 0.5.1
- drizzle-kit
: 0.19.131 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 11/3/2023 in #questions
[BUG]: React Hook Form doesn't submit when using drizzle-zod to create schemes to use in zodResolver
When using
drizzle-zod
to generate schemas from database schemas and using them in the useForm
resolvers the onSubmit won't fire at all for some reason,
So for example:
and then using it in the useForm
in this example when you click the Submit
from the form it doesn't work at all.
however if you build your own schema using zod it works fine.
For reference this was working about a about a week ago.
No errors show in the browser console or terminal, so i don't know what is up there
I have posted issues on react-hook-form
and drizzle-orm
however I'm not sure which team is that the problem is coming from
https://github.com/react-hook-form/resolvers/issues/642
https://github.com/drizzle-team/drizzle-orm/issues/1448
To Reproduce
Steps to reproduce the behavior:
1. create a schema using zod
2. create a zod schema using drizzle-zod
and createInsertSchema
3. import that schema into a useForm
resolver
4. try submitting the form (should not work)
Codesandbox link
very simple application that doesn't seem to submit:
https://codesandbox.io/p/sandbox/react-hook-form-zod-resolver-not-working-9c7qn9
Environment & setup
Operating systems that is is occuring in:
- Mac ventura 13.5.2,
- Windows 10
- Windows 11
- Codesandbox
Browsers:
- Chrome
Versions of packages:
- react-hook-form
: 7.47.0
- @hookform/resolvers
: 3.3.2
- drizzle-orm
: 0.28.6
- drizzle-zod
: 0.5.1
- drizzle-kit
: 0.19.132 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 11/3/2023 in #questions
Having an issue when using Nextauth for signing in getting `Invalid Compact JWE`
So i have adjusted my User interface and what Nextauth session return. this is my new interfaces:
since then i seem to be getting this error:
Even following what is says in the link i can't figure it out
3 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 10/24/2023 in #questions
Struggling to use VERCEL_URL with `@t3-oss/env-nextjs`
So i am trying to use the
VERCEL_URL
for my app url however I'm having issue on how to use it and still fullfil the types.
my env.mjs
my nextjs.config.mjs
4 replies
TTCTheo's Typesafe Cult
•Created by Jacob on 10/7/2023 in #questions
Custom fetch handler, not working with relative paths
so when using fetch you can do this:
fetch("/api/users)
which is great then you don't have to rely on an envioment varibale or URL changing.
so in my app i have created a custom fetch handler, this sets things like authorization, revalidation and anything else i would want, however it doesn't seem to want to work with relative paths.
Custom request:
so this is what i want to do is Request("/api/users")
rather then Reqeust("${baseUrl}/api/users")
beacuse doing this seems to fail in production builds in Vercel as the routes don't exist on the production url
I am using Nextjs and Vercel to deploy my project for anyopne wondering2 replies