Elite
Elite
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Elite on 4/5/2025 in #questions
Best no sql db
So I have some pretty unstructured data and don’t really want a sql database. Would also like some ai capabilities like vector search and etc. What is the best no sql db for Nextjs apps? I’m coming from theos new tech stack vid and he doesn’t mention any no sql dbs Using mongodb rn and may use their vector solution later too. Pls ping me if you know
2 replies
BABetter Auth
Created by Elite on 3/26/2025 in #help
newbie: are my conventions for checking if a user is logged in on client and server side fine?
hi so this is my first time rolling my own auth. ive used clerk before. the db im using with better auth is mongodb as my user data is there rn. We only need google auth (no email/password). I've gone through the installation and setup and ive got google user logins registering in my mongodb collection. The question I have is, am I properly checking if the users logged in (client and server side)? for the client side, i made a "client-auth-guard" component that basically checks it. So is it fine if I use this component for the client side: https://gist.github.com/navincodesalot/e3fcd7581d92ae51ea1602cdb4ffe943 For server side checking if user is logged in, Iwould I have to use server actions? (https://www.better-auth.com/docs/integrations/next#rsc-and-server-actions) but then how would the server side look like on a route handler? (my post, get, etc endpoints) My middleware.ts: (follows a clerk pattern) https://gist.github.com/navincodesalot/2f2d016202d298cafa7c3925a047e71c Just wanted to know if I am approaching the checking on client and server side properly thanks. (Also I feel it’s a bit slow when checking if a user is logged in or not. And when I use my middleware to redirect users if they access locked routes, it’s chunky and slow. Is it cause it’s a dev server?)
4 replies
BABetter Auth
Created by Elite on 3/26/2025 in #help
newbie: are my conventions for checking if a user is logged in on client and server side fine?
hi so this is my first time rolling my own auth. ive used clerk before. the db im using with better auth is mongodb as my user data is there rn. We only need google auth (no email/password). I've gone through the installation and setup and ive got google user logins registering in my mongodb collection. The question I have is, am I properly checking if the users logged in (client and server side)? for the client side, i made a "client-auth-guard" component that basically checks it. So is it fine if I use this component for the client side: https://gist.github.com/navincodesalot/e3fcd7581d92ae51ea1602cdb4ffe943 For server side checking if user is logged in, Iwould I have to use server actions? (https://www.better-auth.com/docs/integrations/next#rsc-and-server-actions) but then how would the server side look like on a route handler? (my post, get, etc endpoints) My middleware.ts: (follows a clerk pattern) https://gist.github.com/navincodesalot/2f2d016202d298cafa7c3925a047e71c Just wanted to know if I am approaching the checking on client and server side properly thanks. (Also I feel it’s a bit slow when checking if a user is logged in or not. And when I use my middleware to redirect users if they access locked routes, it’s chunky and slow. Is it cause it’s a dev server?)
1 replies
TTCTheo's Typesafe Cult
Created by Elite on 6/24/2024 in #questions
instant updates from route handler to frontend
So I have a webhook server that lets me know when a PayPal invoice has been paid. And I have a dynamic route (/transaction/{id}) I want to immediately change my frontend when this invoice gets paid on the correlating id. Rn I have a use state that checks for transaction status changes in mongodb. So since the webhook runs on a route handler, I’m able to update the transaction’s state in mongodb, but Im not able to let the frontend use effect know that it’s been updating. I don’t really want to poll as I want this flow to be as instant as possible, the user pays invoice in PayPal, frontend changes. How could I do this?
54 replies
TTCTheo's Typesafe Cult
Created by Elite on 5/6/2024 in #questions
nextjs cache questions with new react news
with the new react fetch stuff, if I want to use NextJS unstable_cache, do I need to also wrap a React.cache over it?
4 replies
TTCTheo's Typesafe Cult
Created by Elite on 5/6/2024 in #questions
change typescript version in workspace to have typesafety for nextjs (const dynamic =)
how can I change the typescript version in my workspace to have typesafety for nextjs (const dynamic =)? I tried searching change ts version but use the workspace option doesn't exist. Do i need to be in a ts file?
5 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/27/2024 in #questions
permanent and secure state storage
so for my app im checking if a user has paid a paypal invoice. on the frontend I display a few buttons (so once they pay it, they click a button) I basically time it so in 180 seconds the user has to pay it or it gets cancelled. but the first 180 sec, they get a button that resets the time and lets them do it again without filling in a form. im wondering how I can store the state of such things permanently (they can't reload the page to reset timers or whatever) I was thinking local storage but users could edit the numebr of times they've clicked hte button to check (thats a state var)
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/25/2024 in #questions
does react ssr now?
Might be a stupid question but does react have SSR now with the introduction of server and client components?
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/24/2024 in #questions
invalid env variables
So Im using nextjs + drizzle + neon db Ive setup a script to print my databse i get this error:
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
` here is my env.js: https://gist.github.com/navincodesalot/e91d0cd5ffca574fe1a593ac48ae5311 Here is my server/index.ts: https://gist.github.com/navincodesalot/bfda54ac39a0c5cdf88867fa3ad22eb5 Is there a reason I can't use process.env in my index.ts? am I using it correctly
42 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/24/2024 in #questions
how do i get the vercel bot to comment on prs?
how do i get the vercel bot to comment on prs? Not sure why but it doesn't seem to do it on default
7 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/24/2024 in #questions
invalid env variable error with drizzle and neondb
So Im using nextjs + drizzle + neon db Ive setup a script to print my databse i get this error:
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
` here is my env.js: https://gist.github.com/navincodesalot/e91d0cd5ffca574fe1a593ac48ae5311 Here is my server/index.ts: https://gist.github.com/navincodesalot/bfda54ac39a0c5cdf88867fa3ad22eb5 Is there a reason I can't use process.env in my index.ts? am I using it correctly
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/21/2024 in #questions
invalid env vars with drizzle and neondb
So Im using nextjs + drizzle + neon db Ive setup a script to print my databse i get this error:
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Invalid environment variables: {
DATABASE_URL: [ 'Required' ],
CLERK_SECRET_KEY: [ 'Required' ],
TAVILY_API_KEY: [ 'Required' ],
GROQ_API_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_SIGN_UP_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: [ 'Required' ],
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: [ 'Required' ]
}
file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:29:15)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-core/dist/index.js:35:16)
at createEnv (file:///C:/Users/rkmad/partnerfind.tech/node_modules/@t3-oss/env-nextjs/dist/index.js:12:12)
at file:///C:/Users/rkmad/partnerfind.tech/src/env.js:4:20
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
` here is my env.js: https://gist.github.com/navincodesalot/e91d0cd5ffca574fe1a593ac48ae5311 Here is my server/index.ts: https://gist.github.com/navincodesalot/bfda54ac39a0c5cdf88867fa3ad22eb5 Is there a reason I can't use process.env in my index.ts? am I using it correctly
7 replies
TTCTheo's Typesafe Cult
Created by Elite on 3/21/2024 in #questions
server dir with nextjs and drizzle
So Im configuring a drizzle and nextjs app router application In the server directory, my env keys dont work unless i add:
import {config} from 'dotenv';

config ({
path: '.env',
});
import {config} from 'dotenv';

config ({
path: '.env',
});
is there a reason for this? i thought I jsut need to do process.env.VALUE (works in api routes)
4 replies
TTCTheo's Typesafe Cult
Created by Elite on 10/31/2023 in #questions
shadcn ui help
hi so i used a template for my landing page, then i manually installed shadcn ui. i'm trying to use the popover on it: i get this look https://media.discordapp.net/attachments/1166165842942242906/1166165843412009011/image.png?ex=65497f93&is=65370a93&hm=84c517c0be1cedfc47a0cde9e43f3fb80852b2c1aedf4af88965b99c93b14f8a& my code: popover.tsx:
"use client"

import * as React from "react"
import * as PopoverPrimitive from "@radix-ui/react-popover"

import { cn } from "@/lib/utils"

const Popover = PopoverPrimitive.Root

const PopoverTrigger = PopoverPrimitive.Trigger

const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
<PopoverPrimitive.Portal>
<PopoverPrimitive.Content
ref={ref}
align={align}
sideOffset={sideOffset}
className={cn(
"z-50 w-72 rounded-md border border-slate-200 bg-white p-4 text-slate-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",
className
)}
{...props}
/>
</PopoverPrimitive.Portal>
))
PopoverContent.displayName = PopoverPrimitive.Content.displayName

export { Popover, PopoverTrigger, PopoverContent }
"use client"

import * as React from "react"
import * as PopoverPrimitive from "@radix-ui/react-popover"

import { cn } from "@/lib/utils"

const Popover = PopoverPrimitive.Root

const PopoverTrigger = PopoverPrimitive.Trigger

const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
<PopoverPrimitive.Portal>
<PopoverPrimitive.Content
ref={ref}
align={align}
sideOffset={sideOffset}
className={cn(
"z-50 w-72 rounded-md border border-slate-200 bg-white p-4 text-slate-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",
className
)}
{...props}
/>
</PopoverPrimitive.Portal>
))
PopoverContent.displayName = PopoverPrimitive.Content.displayName

export { Popover, PopoverTrigger, PopoverContent }
Globals.css: https://gist.github.com/navincodesalot/4d4b6273511a903c13ba9cdf52d44779 Components.json: https://gist.github.com/navincodesalot/b7fdbf882d824475e5fc90a2915dbe83 Tailwind.config.js: https://gist.github.com/navincodesalot/4de9deda69be629e149c3206314854a3
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 10/24/2023 in #questions
shadcn ui help
hi so i used a template for my landing page, then i manually installed shadcn ui. i'm trying to use the popover on it: i get this look https://media.discordapp.net/attachments/1166165842942242906/1166165843412009011/image.png?ex=65497f93&is=65370a93&hm=84c517c0be1cedfc47a0cde9e43f3fb80852b2c1aedf4af88965b99c93b14f8a& my code: popover.tsx:
"use client"

import * as React from "react"
import * as PopoverPrimitive from "@radix-ui/react-popover"

import { cn } from "@/lib/utils"

const Popover = PopoverPrimitive.Root

const PopoverTrigger = PopoverPrimitive.Trigger

const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
<PopoverPrimitive.Portal>
<PopoverPrimitive.Content
ref={ref}
align={align}
sideOffset={sideOffset}
className={cn(
"z-50 w-72 rounded-md border border-slate-200 bg-white p-4 text-slate-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",
className
)}
{...props}
/>
</PopoverPrimitive.Portal>
))
PopoverContent.displayName = PopoverPrimitive.Content.displayName

export { Popover, PopoverTrigger, PopoverContent }
"use client"

import * as React from "react"
import * as PopoverPrimitive from "@radix-ui/react-popover"

import { cn } from "@/lib/utils"

const Popover = PopoverPrimitive.Root

const PopoverTrigger = PopoverPrimitive.Trigger

const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
<PopoverPrimitive.Portal>
<PopoverPrimitive.Content
ref={ref}
align={align}
sideOffset={sideOffset}
className={cn(
"z-50 w-72 rounded-md border border-slate-200 bg-white p-4 text-slate-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",
className
)}
{...props}
/>
</PopoverPrimitive.Portal>
))
PopoverContent.displayName = PopoverPrimitive.Content.displayName

export { Popover, PopoverTrigger, PopoverContent }
Globals.css: https://gist.github.com/navincodesalot/4d4b6273511a903c13ba9cdf52d44779 Components.json: https://gist.github.com/navincodesalot/b7fdbf882d824475e5fc90a2915dbe83 Tailwind.config.js: https://gist.github.com/navincodesalot/4de9deda69be629e149c3206314854a3
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 10/24/2023 in #questions
shadcn ui - css scuffed
No description
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 9/10/2023 in #questions
type errors even after disabling
22:32 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
36:9 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:11 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:23 Error: Unsafe member access .predicted_class on an `any` value. @typescript-eslint/no-unsafe-member-access
46:15 Warning: 'result' is assigned a value but never used. @typescript-eslint/no-unused-vars

./src/app/page.tsx
16:47 Warning: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
19:72 Error: Invalid type "any" of template literal expression. @typescript-eslint/restrict-template-expressions
19:72 Error: Unsafe member access .key on an `any` value. @typescript-eslint/no-unsafe-member-access
21:25 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
22:33 Error: Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`. @typescript-eslint/no-unsafe-argument
22:33 Error: Unsafe member access .prediction on an `any` value. @typescript-eslint/no-unsafe-member-access

./src/lib/mongo/mongodb.ts
15:10 Error: Expected non-Promise value in a boolean conditional. @typescript-eslint/no-misused-promises
22:32 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
36:9 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:11 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:23 Error: Unsafe member access .predicted_class on an `any` value. @typescript-eslint/no-unsafe-member-access
46:15 Warning: 'result' is assigned a value but never used. @typescript-eslint/no-unused-vars

./src/app/page.tsx
16:47 Warning: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
19:72 Error: Invalid type "any" of template literal expression. @typescript-eslint/restrict-template-expressions
19:72 Error: Unsafe member access .key on an `any` value. @typescript-eslint/no-unsafe-member-access
21:25 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
22:33 Error: Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`. @typescript-eslint/no-unsafe-argument
22:33 Error: Unsafe member access .prediction on an `any` value. @typescript-eslint/no-unsafe-member-access

./src/lib/mongo/mongodb.ts
15:10 Error: Expected non-Promise value in a boolean conditional. @typescript-eslint/no-misused-promises
my .eslintrc.cjs
...
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
},
};

module.exports = config;
...
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
},
};

module.exports = config;
1 replies
TTCTheo's Typesafe Cult
Created by Elite on 9/8/2023 in #questions
type errors even after disabling
22:32 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
36:9 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:11 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:23 Error: Unsafe member access .predicted_class on an `any` value. @typescript-eslint/no-unsafe-member-access
46:15 Warning: 'result' is assigned a value but never used. @typescript-eslint/no-unused-vars

./src/app/page.tsx
16:47 Warning: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
19:72 Error: Invalid type "any" of template literal expression. @typescript-eslint/restrict-template-expressions
19:72 Error: Unsafe member access .key on an `any` value. @typescript-eslint/no-unsafe-member-access
21:25 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
22:33 Error: Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`. @typescript-eslint/no-unsafe-argument
22:33 Error: Unsafe member access .prediction on an `any` value. @typescript-eslint/no-unsafe-member-access

./src/lib/mongo/mongodb.ts
15:10 Error: Expected non-Promise value in a boolean conditional. @typescript-eslint/no-misused-promises
22:32 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
36:9 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:11 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:23 Error: Unsafe member access .predicted_class on an `any` value. @typescript-eslint/no-unsafe-member-access
46:15 Warning: 'result' is assigned a value but never used. @typescript-eslint/no-unused-vars

./src/app/page.tsx
16:47 Warning: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
19:72 Error: Invalid type "any" of template literal expression. @typescript-eslint/restrict-template-expressions
19:72 Error: Unsafe member access .key on an `any` value. @typescript-eslint/no-unsafe-member-access
21:25 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
22:33 Error: Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`. @typescript-eslint/no-unsafe-argument
22:33 Error: Unsafe member access .prediction on an `any` value. @typescript-eslint/no-unsafe-member-access

./src/lib/mongo/mongodb.ts
15:10 Error: Expected non-Promise value in a boolean conditional. @typescript-eslint/no-misused-promises
my .eslintrc.cjs
...
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
},
};

module.exports = config;
...
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
},
};

module.exports = config;
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 9/7/2023 in #questions
type errors i wanna change to warn
22:32 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
36:9 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:11 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:23 Error: Unsafe member access .predicted_class on an `any` value. @typescript-eslint/no-unsafe-member-access
46:15 Warning: 'result' is assigned a value but never used. @typescript-eslint/no-unused-vars

./src/app/page.tsx
16:47 Warning: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
19:72 Error: Invalid type "any" of template literal expression. @typescript-eslint/restrict-template-expressions
19:72 Error: Unsafe member access .key on an `any` value. @typescript-eslint/no-unsafe-member-access
21:25 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
22:33 Error: Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`. @typescript-eslint/no-unsafe-argument
22:33 Error: Unsafe member access .prediction on an `any` value. @typescript-eslint/no-unsafe-member-access

./src/lib/mongo/mongodb.ts
15:10 Error: Expected non-Promise value in a boolean conditional. @typescript-eslint/no-misused-promises
22:32 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
36:9 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:11 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
43:23 Error: Unsafe member access .predicted_class on an `any` value. @typescript-eslint/no-unsafe-member-access
46:15 Warning: 'result' is assigned a value but never used. @typescript-eslint/no-unused-vars

./src/app/page.tsx
16:47 Warning: Unexpected any. Specify a different type. @typescript-eslint/no-explicit-any
19:72 Error: Invalid type "any" of template literal expression. @typescript-eslint/restrict-template-expressions
19:72 Error: Unsafe member access .key on an `any` value. @typescript-eslint/no-unsafe-member-access
21:25 Error: Unsafe assignment of an `any` value. @typescript-eslint/no-unsafe-assignment
22:33 Error: Unsafe argument of type `any` assigned to a parameter of type `SetStateAction<string>`. @typescript-eslint/no-unsafe-argument
22:33 Error: Unsafe member access .prediction on an `any` value. @typescript-eslint/no-unsafe-member-access

./src/lib/mongo/mongodb.ts
15:10 Error: Expected non-Promise value in a boolean conditional. @typescript-eslint/no-misused-promises
my .eslintrc.cjs
...
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
},
};

module.exports = config;
...
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
},
};

module.exports = config;
2 replies
TTCTheo's Typesafe Cult
Created by Elite on 9/4/2023 in #questions
add on to the file object
without changing the type of UploadedFile, can i add a field to the file object so my frontend can read it after a file is uploaded
6 replies