alan
alan
Explore posts from servers
TTCTheo's Typesafe Cult
Created by alan on 3/31/2024 in #questions
how to use yarnrc.yml
found that it can be fixed with yarn set version latest per https://github.com/yarnpkg/berry/issues/2938#issuecomment-855838927
3 replies
TTCTheo's Typesafe Cult
Created by alan on 3/23/2024 in #questions
how to get better-sqlite3 to work in docker
the last issue was fixed by deleting node_modules and reinstalling it. Thanks again, @nyx (Rustular DevRel) !
12 replies
TTCTheo's Typesafe Cult
Created by alan on 3/23/2024 in #questions
how to get better-sqlite3 to work in docker
I just updated it and am now getting this error:
36.63 Error: The module '/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
36.63 was compiled against a different Node.js version using
36.63 NODE_MODULE_VERSION 111. This version of Node.js requires
36.63 NODE_MODULE_VERSION 120. Please try re-compiling or re-installing
36.63 the module (for instance, using `npm rebuild` or `npm install`).
36.63 at Module._extensions..node (node:internal/modules/cjs/loader:1464:18)
36.63 at Module.load (node:internal/modules/cjs/loader:1205:32)
36.63 at Module._load (node:internal/modules/cjs/loader:1021:12)
36.63 at Module.require (node:internal/modules/cjs/loader:1230:19)
36.63 at mod.require (/app/node_modules/next/dist/server/require-hook.js:65:28)
36.63 at require (node:internal/modules/helpers:179:18)
36.63 at bindings (/app/node_modules/bindings/bindings.js:112:48)
36.63 at new Database (/app/node_modules/better-sqlite3/lib/database.js:48:64)
36.63 at Database (/app/node_modules/better-sqlite3/lib/database.js:11:10)
36.63 at 91070 (/app/.next/server/app/login/github/route.js:1:2375) {
36.63 code: 'ERR_DLOPEN_FAILED'
36.63 }
36.63 Error: The module '/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
36.63 was compiled against a different Node.js version using
36.63 NODE_MODULE_VERSION 111. This version of Node.js requires
36.63 NODE_MODULE_VERSION 120. Please try re-compiling or re-installing
36.63 the module (for instance, using `npm rebuild` or `npm install`).
36.63 at Module._extensions..node (node:internal/modules/cjs/loader:1464:18)
36.63 at Module.load (node:internal/modules/cjs/loader:1205:32)
36.63 at Module._load (node:internal/modules/cjs/loader:1021:12)
36.63 at Module.require (node:internal/modules/cjs/loader:1230:19)
36.63 at mod.require (/app/node_modules/next/dist/server/require-hook.js:65:28)
36.63 at require (node:internal/modules/helpers:179:18)
36.63 at bindings (/app/node_modules/bindings/bindings.js:112:48)
36.63 at new Database (/app/node_modules/better-sqlite3/lib/database.js:48:64)
36.63 at Database (/app/node_modules/better-sqlite3/lib/database.js:11:10)
36.63 at 91070 (/app/.next/server/app/login/github/route.js:1:2375) {
36.63 code: 'ERR_DLOPEN_FAILED'
36.63 }
12 replies
TTCTheo's Typesafe Cult
Created by alan on 3/23/2024 in #questions
how to get better-sqlite3 to work in docker
I think that may have helped, since I'm getting a new error!
41.87 Type error: Conversion of type 'Statement' to type 'DatabaseUser' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
41.87 Type 'Statement' is missing the following properties from type 'DatabaseUser': id, username, github_id
41.87
41.87 26 | });
41.87 27 | const githubUser: GitHubUser = await githubUserResponse.json();
41.87 > 28 | const existingUser = db
41.87 | ^
41.87 29 | .prepare('SELECT * FROM user WHERE github_id = ?')
41.87 30 | .get(githubUser.id) as DatabaseUser | undefined;
41.87 31 |
41.87 Type error: Conversion of type 'Statement' to type 'DatabaseUser' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
41.87 Type 'Statement' is missing the following properties from type 'DatabaseUser': id, username, github_id
41.87
41.87 26 | });
41.87 27 | const githubUser: GitHubUser = await githubUserResponse.json();
41.87 > 28 | const existingUser = db
41.87 | ^
41.87 29 | .prepare('SELECT * FROM user WHERE github_id = ?')
41.87 30 | .get(githubUser.id) as DatabaseUser | undefined;
41.87 31 |
this is weird that I'm only seeing this issue when building but not running in dev mode
12 replies
TTCTheo's Typesafe Cult
Created by alan on 3/23/2024 in #questions
how to get better-sqlite3 to work in docker
thanks! I'll try chaning to a debian based image and report back. I was using an alpine based one per this example https://github.com/vercel/next.js/tree/canary/examples/with-docker
12 replies
TTCTheo's Typesafe Cult
Created by alan on 3/17/2024 in #questions
How to fix next auth beta redirecting to undefined path
another update. the fix didn't hold for some reason and I now just switched to Lucia auth
22 replies
TTCTheo's Typesafe Cult
Created by alan on 3/17/2024 in #questions
How to fix next auth beta redirecting to undefined path
I found out a few things. When updating next auth, setting NEXTAUTH_URL="http://localhost:3000" will lead to some strange breakage. I had thought that even though the docs don't mention using this env var, it would be harmless to keep this in from next auth < v5. Additionally, it insists on having the AUTH_SECRET env var defined, even when trying to run in dev, whereas in previous versions it seemed to only break when trying to deploy to Vercel. Otherwise, the rest of the steps outlined in https://authjs.dev/guides/upgrade-to-v5 works for me.
22 replies
TTCTheo's Typesafe Cult
Created by alan on 3/17/2024 in #questions
How to fix next auth beta redirecting to undefined path
I'm also seeing this being logged: [1] [auth][error] UnknownAction: Cannot parse action at /signin/github .Read more at https://errors.authjs.dev#unknownaction
22 replies
TTCTheo's Typesafe Cult
Created by alan on 3/17/2024 in #questions
How to fix next auth beta redirecting to undefined path
I'm just looking to build a very simple to do app behind auth using nextjs or t3 app. I tried to update a generated t3 app with next auth beta but it's having its own issues
22 replies
TTCTheo's Typesafe Cult
Created by alan on 3/17/2024 in #questions
How to fix next auth beta redirecting to undefined path
22 replies
TTCTheo's Typesafe Cult
Created by David on 3/16/2024 in #questions
Authentication and Session Management in Next.js 14 with Microservices Architecture
for auth, have you checked this out: https://www.youtube.com/watch?v=DJvM2lSPn6w
2 replies
TTCTheo's Typesafe Cult
Created by Tamás Soós on 10/27/2023 in #questions
Next.js app router with tRPC context and NextAuth
when using a provider client component, doesn't that make everything from that point on a client component tree, which makes me wonder why even bother switch to the app router if doing that
6 replies
TTCTheo's Typesafe Cult
Created by hadi__mk0 on 10/21/2023 in #questions
pdfs upload
I checked and it is possible
3 replies
TTCTheo's Typesafe Cult
Created by alan on 10/21/2023 in #questions
how to resolve hydration failed error when including button shadcn dialog
I'm not sure what the adoption is like, but from the videos, it sounds like it's fairly high now
17 replies
TTCTheo's Typesafe Cult
Created by alan on 10/21/2023 in #questions
how to resolve hydration failed error when including button shadcn dialog
you can ask the specific question in a separate thread here, though
17 replies
TTCTheo's Typesafe Cult
Created by alan on 10/21/2023 in #questions
how to resolve hydration failed error when including button shadcn dialog
@hadi__mk0 I don't. sorry. I might though in the near future! (not that that helps you now 😦 )
17 replies
TTCTheo's Typesafe Cult
Created by alan on 10/21/2023 in #questions
how to resolve hydration failed error when including button shadcn dialog
oh awesome. that fixed it
17 replies
TTCTheo's Typesafe Cult
Created by alan on 10/21/2023 in #questions
how to resolve hydration failed error when including button shadcn dialog
let me try that now
17 replies
TTCTheo's Typesafe Cult
Created by alan on 10/21/2023 in #questions
how to resolve hydration failed error when including button shadcn dialog
I see now that I may need to add asTrigger to the DialogTrigger component
17 replies