Help - session type in _app.tsx is missing
I recently opened my
_app.tsx
and noticed that there was an error with the session
object being destructured in the app.
I'm not too sure what went wrong here, but I did remove and reinstall my node_modules
for good measure, and no luck.
Repo link - https://github.com/SeanCassiere/next-discord-clone/blob/master/src/pages/_app.tsx#L17
Would appreciate it if anyone could let me know what I messed up.GitHub
next-discord-clone/_app.tsx at master · SeanCassiere/next-discord-c...
(WIP) - A Discord clone with the T3 Stack. Contribute to SeanCassiere/next-discord-clone development by creating an account on GitHub.
20 Replies
More context,
pageProps
is {}
😲It's new in Next 12.3 I think (they changed pageProps from any to {})
You'll have to add typing yourself
Thanks @Piotrek
time for any-casting
@nexxel @julius Should an issue be created in the ct3a repo for this? Assuming, ct3a moves on to
next-12.3
this would then affect new projects inited by others yes?
Basically, ct3a providing its own types or any-casting, or something....Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
GitHub
bug:
session
type issue on NextJs 12.3.0 · Issue #412 · t3-oss/cr...Provide environment information System: OS: Windows 10 10.0.22000 CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-1240P Memory: 1.77 GB / 15.69 GB Binaries: Node: 16.15.1 - C:\Program Files\nodejs\node...
it will be fixed in the next nextjs release
Cool stuff, thanks a bunch.
the fix has been merged https://github.com/vercel/next.js/pull/40391
GitHub
feat(ts): expose
AppType
by balazsorban44 · Pull Request #40391 ·...An alternative solution to #40371
Ref: #38867, t3-oss/create-t3-app#412, t3-oss/create-t3-app#414
Bug
Related issues linked using fixes #number
Integration tests added
Errors have helpful link ...
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Believe so, I myself just ugraded to 12.3 like a day back and noticed this today
https://github.com/t3-oss/create-t3-app/pull/410#issuecomment-1242479282
im waiting for 12.3.1
where apptype is fixed
Looks like 12.3.1 is out!
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
There are some breaking changes from the provided ct3a template that I've found, but I'll leave this up to the Giga-brain peeps in the t3 community.
#9 The import for AppType now must come from
next/app
. Not mandatory, but it was recommended of sorts (https://github.com/vercel/next.js/issues/40371#issuecomment-1241805459).
#19 The import will need to be typed with the Session
from next-auth
.GitHub
bug(typedef): AppType typedef changed in 12.3 · Issue #40371 · verc...
Verify canary release I verified that the issue exists in the latest Next.js canary release Provide environment information Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Ver...
im making a pr
GitHub
fix(template): bump next to 12.3.1 and fix AppType by nexxeln · Pul...
✅ Checklist
I have followed every step in the contributing guide (updated 2022-08-15).
The PR title follows the convention we established conventional-commit
I performed a functional test on my...
done done done
Noiceeeeeeeee