create-t3-app
create-t3-app copied to clipboard
bug: openid-client not included in dependencies which crashes when using pnpm
Provide environment information
System: OS: macOS 14.2.1 CPU: (10) arm64 Apple M1 Pro Memory: 326.64 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm pnpm: 8.11.0 - ~/.nvm/versions/node/v18.17.1/bin/pnpm
Describe the bug
On a fresh run of create-t3-app
the Discord NextAuth login returned an error:
at async Client.oauthCallback (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]/node_modules/openid-client/lib/client.js:532:30)
at async oAuthCallback (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next-auth/core/lib/oauth/callback.js:120:22)
at async Object.callback (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next-auth/core/routes/callback.js:18:79)
at async AuthHandler (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next-auth/core/index.js:202:38)
at async NextAuthRouteHandler (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next-auth/next/index.js:50:30)
at async NextAuth._args$ (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next-auth/next/index.js:85:24)
at async /Users/erikashepa/Projects/budget/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:63251 {
name: 'OAuthCallbackError',
code: undefined
},
providerId: 'discord',
message: 'invalid_client'
After pnpm i openid-client
, rerunning the app I was able to successfully login.
Reproduction repo
To reproduce
pnpm create t3-app@latest
Additional information
No response
I can't do anything without a repro.
NEXT!
(kindly add a repro)
NP @FinnDore . Here it is: https://github.com/erikash/pnpm-create-t3-app-repro
Just make sure to pnpm i
and update the .env
for Discord Auth.
You'll get the above error.
After pnpm i openid-client
, rerunning the app I was able to successfully login.
repro works fine for me, guessing it has to do with some pnpm version not installing proper peerdeps / resolving versions below accepted range.