Open achtan opened 1 week ago
System: OS: macOS 14.6.1 CPU: (12) arm64 Apple M2 Max Memory: 104.30 MB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.20.2 - ~/.nvm/versions/node/v18.20.2/bin/node npm: 10.5.0 - ~/.nvm/versions/node/v18.20.2/bin/npm pnpm: 9.7.1 - ~/.nvm/versions/node/v18.20.2/bin/pnpm bun: 1.1.12 - ~/.bun/bin/bun Watchman: 2024.04.08.00 - /opt/homebrew/bin/watchman
TS2742: The inferred type of createTRPCContext cannot be named without a reference to ../../../ node_modules/@clerk/ nextjs/ dist/ types/ server/ protect. This is likely not portable. A type annotation is necessary.
../../../ node_modules/@clerk/ nextjs/ dist/ types/ server/ protect
https://github.com/achtan/3turbo
I just added the auth method from @clerk/nextjs to the TRPC context and the TS started complaining.
auth
@clerk/nextjs
steps:
packages/api/src/trpc.ts
No response
Same issue for me
Seems like a Clerk issue that they're not exporting enough types. Add a type annotation to isomorphicGetSession like the message suggests
isomorphicGetSession
Provide environment information
System: OS: macOS 14.6.1 CPU: (12) arm64 Apple M2 Max Memory: 104.30 MB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.20.2 - ~/.nvm/versions/node/v18.20.2/bin/node npm: 10.5.0 - ~/.nvm/versions/node/v18.20.2/bin/npm pnpm: 9.7.1 - ~/.nvm/versions/node/v18.20.2/bin/pnpm bun: 1.1.12 - ~/.bun/bin/bun Watchman: 2024.04.08.00 - /opt/homebrew/bin/watchman
Describe the bug
TS2742: The inferred type of createTRPCContext cannot be named without a reference to
../../../ node_modules/@clerk/ nextjs/ dist/ types/ server/ protect
. This is likely not portable. A type annotation is necessary.Link to reproduction
https://github.com/achtan/3turbo
To reproduce
I just added the
auth
method from@clerk/nextjs
to the TRPC context and the TS started complaining.steps:
packages/api/src/trpc.ts
fileAdditional information
No response