[BUG] Can't resolve '@/node_modules/next-auth/providers/email'
daniel-farina opened this issue · comments
Daniel Farina commented
When running locally I'm seeing this error
./utils/app/auth/providers.ts:97:27
Module not found: Can't resolve '@/node_modules/next-auth/providers/email'
95 | }
96 | if (EMAIL_FROM) {
> 97 | const provider = await import('@/node_modules/next-auth/providers/email');
| ^
98 | const EmailProvider = provider.default;
99 | providers.push(
100 | EmailProvider({
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./app/api/auth/[...nextauth]/route.ts
Daniel Farina commented
I'm not quite sure why it was referencing the local @node_modules folder but after changing it to "next-auth/providers/email" it works again.
Daniel Farina commented
Same with "@/node_modules/next-auth/react"