get-convex / convex-auth

Library for built-in auth
https://labs.convex.dev/auth
44 stars 10 forks source link

Convex auth Password provider not found #74

Open disrae opened 1 week ago

disrae commented 1 week ago

Using Expo, this suddenly started happening, I have posted on discord, but I'm not sure if it's a bug or not:

Error

Static Rendering Error (Node.js)
While trying to resolve module `@convex-dev/auth/providers/Password` 
from file `/Users/daniel/Documents/Projects/chat-plan-ai/convex/auth.ts`, the package `/Users/daniel/Documents/Projects/chat-plan-ai/node_modules/@convex-
dev/auth/providers/Password/package.json` was successfully found. 
However, this package itself specifies a `main` module field that could not be resolved (`/Users/daniel/Documents/Projects/chat-plan-ai/node_modules/@convex-dev/auth/dist/providers/Password/index.js`. Indeed, none of these files exist:

  * /Users/daniel/Documents/Projects/chat-plan-ai/node_modules/@convex-dev/auth/dist/providers/Password/index.js(.web.ts|.ts|.web.tsx|.tsx|.web.js|.js|.web.jsx|.jsx|.web.json|.json|.web.cjs|.cjs|.web.mjs|.mjs|.web.scss|.scss|.web.sass|.sass|.web.css|.css)
  * /Users/daniel/Documents/Projects/chat-plan-ai/node_modules/@convex-dev/auth/dist/providers/Password/index.js/index(.web.ts|.ts|.web.tsx|.tsx|.web.js|.js|.web.jsx|.jsx|.web.json|.json|.web.cjs|.cjs|.web.mjs|.mjs|.web.scss|.scss|.web.sass|.sass|.web.css|.css)
Source

 1 |import { Password } from "@convex-dev/auth/providers/Password";

Demo

There is no index.js file in the node module 🤷 image

image

Thank you for all your work 🙏

bryanltrang commented 3 days ago

+1 seeing the same thing on my end

disrae commented 2 days ago

It turns out, I think this is actually the correct file structure, the issue is when there's some bad syntax it throws this error which is kind of confusing.

Do you mind showing your error or how you set up the provider?