TTC
Theo's Typesafe Cultryanagillie
GitHub Action Failing Type-Checks but Working Locally
I'm setting up an automatic github action that will run type checks on my nextjs app when pushed / pr'd to main. Problem is the type checks fail in github actions but pass locally.
W
whatplan•327d ago
can you show package.json scripts
R
ryanagillie•327d ago
This is why I'm confused. Even did a fresh pull locally, npm ci, ran tsc, nothing
but the github action really doesn't love it
W
whatplan•327d ago
very weird
maybe you have some stuff installed globally
I feel like thats the only thing it could be
R
ryanagillie•327d ago
W
whatplan•327d ago
weird
R
ryanagillie•327d ago
I saw somewhere else saying it was a types/react-dom problem but mine are latest
I'll try one more thing but yeah this is weeeeeird
W
whatplan•327d ago
does it build when deploying fine
R
ryanagillie•327d ago
locally? yeah. I'll throw in a quick build step to see as well
W
whatplan•327d ago
no like
in a fresh enviorment
idk if your using vercel but when vercel clones + builds does it error
R
ryanagillie•327d ago
I don't use vercel
use DO, which uses another push action
but that builds fine (on the droplet)
W
whatplan•327d ago
so weird
what happens if you run typecheck before build on the do action
R
ryanagillie•327d ago
Oh, I mean I have a webook that runs on push and on my server it'll auto pull the repo, rebuild, and restart
but the logs on my DO droplet show it's building fine
so it's def an issue with github
W
whatplan•327d ago
well im stumped good luck
ping me if you figure it out
B
brunoeduardodev•327d ago
are you using relative package versions on package.json? maybe for some reason the one on CI doesn't include some new types for some new version
you can check which version you're using on your pnpm.lock / yarn.lock and include it as minimal, like
"@types/react-dom": "^18.2.4"
also checking @types/react
should be worth itR
ryanagillie•327d ago
Here I'll post the whole thing
I never use realives, always pin the deps
and yeah always comitting my package-lock (or else npm ci would fail)
types/react and types/react-dom are latest
B
brunoeduardodev•327d ago
yeah this is very weird, almost as package-lock for some reason was out of sync, but it probably isn't, I'm gonna try setting up a similar action to see if I run into this
R
ryanagillie•326d ago
yeah, inspecting my package.lock everything is right
I have no idea, this is so weird
def a github issue
I've pulled fresh on my windows desktop, mac laptop, and DO (ubuntu) droplet, installed, and ran the command and all 3 say no errors
it's literally only github
WAIT
I JUST FRESH INSTALLED ON WINDOWS AND IT FAILED
NO IDEA WHY
breakthrough time
ah, so it's a problem with react-dom 18.2.8
R
ryanagillie•326d ago
GitHub
'SomeComponent' cannot be used as a JSX component. · Issue #42292 ·...
Verify canary release I verified that the issue exists in the latest Next.js canary release Provide environment information Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binar...
R
ryanagillie•326d ago
glad we figured that out, thanks all
no idea why it's half working half not
but until that gets fixed
W
whatplan•326d ago
stable
B
brunoeduardodev•326d ago
production ready
R
ryanagillie•326d ago
hey, it's a @types/react problem, not next LMAO
W
whatplan•326d ago
oh i didnt read the issue far enough then my b
saw vercel/nextjs and assumed
B
brunoeduardodev•326d ago
when talking about server components there's almost no difference now
server components features are better documented on nextjs docs then react.dev
lol
21KMembers
View on DiscordWant results from more Discord servers?
More Postslooking for some tutorialscoming from a rails background, im new to node & t3 in general, is there a tutorial i can follow to is it worth it to have meaningful errors returned from server side form validation?like is it worth it at that point to return an error for every field that is invalid from the backenGood setup for CRA + Serverless in a monorepo?Hey folks, what’s a good setup for a serverless function and a CRA in a monorepo?
If I’m able to stHow to redirect with new headers back to the same page?User goes to page `/foo`, we check if this page is protected, if it is, we rewrite the page to sometThe Edge - what's the pointso as far as i know the edge move a server close as possible to your user right?
but then what's thcloudflare R2 in Versel?Has anyone here used R2 in their NextJS app hosted on Versel? Trying to save money on bandwidth
WhReact.FC equivalent for RSCIs there a "React.FC" equivalent for React Server Components?How do I use the return type of a function with overloads that will be returned in the same functionI'm creating a library, but I have a problem when I use a function with overloads to return itself iMedia not rendering on first try, only after a refreshHey, first of all, this is my first complex Next.js project, so it is very probable that I am doing any good resource for browser extension development?just titleRoute Guarding with nextjsHow do you implement route guarding with nextjs? Not too sure what would be the recommended way to dthe URL must start with the protocol `mongo`I have been geting this error recently, and I have no idea why. my mongodb DATABASE_URL is without "Read and Write in Next Js Is not working in production (vercel)this code is working in local environment but not working in production can anyone tell me how to reDesperate for help with Trpc resolver.How can i get resolve({ default: base64Data }); to only trigger once trpc has returned success or fuseRouter queryHow do y'all handle typescript with nextjs's query params?
Currently I'm doing ```const cartId = quPassword hashing on EDGE?I'm making an app and noticing that vercel's serverless functions are taking very much time to complAuth.js Muti-device SupportI'm implementing auth right now in a site that the user will likely be switching from mobile to deskNextJS should I use a headless CMS?Hello I am working on a project that is a multi user blog where anyone can create a post and commenHow to define this exact relation on prismaGiven this two models, how could I implement a relation between them, where a duel has 2 user Ids inHow much do y'all charge for your apps?I have created two complete custom apps for clients, took 40-60 hours a piece.
Just curious how y'a