Auth.js adapter import causes module not found error

Hey there! I want to build an authenticated app using Auth.js and the newly released Drizzle adapter. I've done the setup exactly as described here, but am getting the following error when running:
[ERR_MODULE_NOT_FOUND]: Cannot find module 'pathtoproject\node_modules@auth\drizzle-adapter\lib\mysql.js' imported from pathtoproject\node_modules@auth\drizzle-adapter\index.js
I.e. my hooks.server.ts file:
import { SvelteKitAuth } from '@auth/sveltekit';
import Credentials from '@auth/core/providers/credentials';
import { DrizzleAdapter } from '@auth/drizzle-adapter';
import { db } from '$lib/server/db/connection';

export const handle = SvelteKitAuth({
adapter: DrizzleAdapter(db),
providers: [
Credentials({
// ...empty
})
]
});
import { SvelteKitAuth } from '@auth/sveltekit';
import Credentials from '@auth/core/providers/credentials';
import { DrizzleAdapter } from '@auth/drizzle-adapter';
import { db } from '$lib/server/db/connection';

export const handle = SvelteKitAuth({
adapter: DrizzleAdapter(db),
providers: [
Credentials({
// ...empty
})
]
});
I'd be very thankful for any help regarding how to fix this My config: - OS: Windows 10 - @auth/core: 0.11.1 - @auth/drizzle-adapter: 0.3.0 - @auth/sveltekit: 0.3.6 - drizzle-orm: ^0.28.2
@auth/drizzle-adapter | Auth.js
Official Drizzle ORM adapter for Auth.js / NextAuth.js.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server