NlaakALD
NlaakALD•4mo ago

Convex-Auth/NextJS/NPM (Not Vite)

Using https://github.com/get-convex/convex-auth-example as a baseline I have created a repo but even though the packages are installed I am getting errors that they cannot be found. - Cannot find module '@convex-dev/auth/server' or its corresponding type declarations. - Cannot find module '@convex-dev/auth/providers/Anonymous' or its corresponding type declarations.ts(2307) - Cannot find module '@convex-dev/auth/providers/Password' or its corresponding type declarations.ts(2307) - Cannot find module 'convex/server' or its corresponding type declarations.ts(2307) etc. I see them in the node_modules folder. I am sorry, I have been stuck on this for three days now. I am trying to convert my 4 apps over to Convex Auth instead of Clerk.
No description
26 Replies
Convex Bot
Convex Bot•4mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Ask in the <#1228095053885476985> channel to get a response from <@1072591948499664996>. - Avoid tagging staff unless specifically instructed. Thank you!
jamalsoueidan
jamalsoueidan•4mo ago
jamalsoueidan
jamalsoueidan•4mo ago
It works, i just tried. what version of npm and node are you using?
NlaakALD
NlaakALDOP•4mo ago
node -v -> v20.12.1 npm -v -> 10.8.3 "engines": { "node": "20.x", "npm": "10.x" },
jamalsoueidan
jamalsoueidan•4mo ago
typescript version used in vscode?=
NlaakALD
NlaakALDOP•4mo ago
"typescript": "^5.2.2" also tried just major "typescript": "^5"
jamalsoueidan
jamalsoueidan•4mo ago
im trying to think what can cause this, because its related to your setup somewhere you didnt change anything in the project?
NlaakALD
NlaakALDOP•4mo ago
i think i should just fork that repo and modify it there in public. - I am using npm directly - I am not using src folder - I am use App Router So there are some big changes at least that way you could pull the repo and mess with it oh yes i did 🙂
jamalsoueidan
jamalsoueidan•4mo ago
thats another talk
NlaakALD
NlaakALDOP•4mo ago
Ok, i promised client no clerk. Let me go do a fork of this and catch it up to my local so others can benefit from it as well
NlaakALD
NlaakALDOP•4mo ago
GitHub
GitHub - AndrewDonelson/convex-auth-example-npm-app-router: Convex ...
Convex Auth example repo (NextsJS, NPM, No Src, App Router) - AndrewDonelson/convex-auth-example-npm-app-router
jamalsoueidan
jamalsoueidan•4mo ago
working? delete package-lock.json delete node-nodules and try again
NlaakALD
NlaakALDOP•4mo ago
done that. .next as well. but will do it. one sec hmmm. npm install is hanging. I'll have to kill it. CTL+C not working. It does it everytime now. But if i kill process and run npm install a second time it completes. actually now thats not even working. npm install will not complete and provide the package.lock. Is https://labs.convex.dev/auth/setup working? Maybe i try to setup everything from scratch then bring in the example repo then my app specific stuff?
jamalsoueidan
jamalsoueidan•4mo ago
i tried both repo they are working
NlaakALD
NlaakALDOP•4mo ago
without vite right?
NlaakALD
NlaakALDOP•4mo ago
I know its beta, so no complains. and i LOVE Convex! But something wierd is going on.
No description
NlaakALD
NlaakALDOP•4mo ago
give me a bit. im going to start from scratch
jamalsoueidan
jamalsoueidan•4mo ago
is this your forked repo?
NlaakALD
NlaakALDOP•4mo ago
no thats the client repo with .next, node_modules and package.lock deleted
jamalsoueidan
jamalsoueidan•4mo ago
what you mean client repo?
NlaakALD
NlaakALDOP•4mo ago
its was based off the examepl (with chat) it has some private code in it. but underneath its the example repo built on top of. I used the Chat as Support kept it in
jamalsoueidan
jamalsoueidan•4mo ago
both repo you gave me in the root, npm instal, npm run dev works if their is nested folder with another project let me know,,,i didnt test that
NlaakALD
NlaakALDOP•4mo ago
The issue it was not deploying to DigitalOcean initially. It was building twice and failing second time. But it deployed (next build & next start) locally and on vercel. They lept saying it was me. So now i've totally broke it enough that i should justy start from scratch. the original branch (wont npm install now)
jamalsoueidan
jamalsoueidan•4mo ago
try to do that...
NlaakALD
NlaakALDOP•4mo ago
not its not nested. here is file structure the components/files is basically a online file manager
No description
NlaakALD
NlaakALDOP•4mo ago
the layout and main page changed. like i said, i had it workign for a week. when i went to deploy on DigitalOcean App Platform (where i have 3 other NextJS/Convex + Clerk) apps, it would not work i have broke it trying to get it to deploy there At this point I think the issue is with them if it works locally and on vercel Thanks for your time, let me attempt to get it back working locally again

Did you find this page helpful?