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.26 Replies
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!
It works, i just tried.
what version of npm and node are you using?
node -v -> v20.12.1
npm -v -> 10.8.3
"engines": {
"node": "20.x",
"npm": "10.x"
},
typescript version used in vscode?=
"typescript": "^5.2.2"
also tried just major
"typescript": "^5"
im trying to think what can cause this, because its related to your setup somewhere
you didnt change anything in the project?
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 🙂
thats another talk
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
ok i forked it here: https://github.com/AndrewDonelson/convex-auth-example-npm-app-router
Let me go re-break it.
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
working?
delete package-lock.json
delete node-nodules
and try again
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?i tried both repo they are working
without vite right?
I know its beta, so no complains. and i LOVE Convex! But something wierd is going on.
give me a bit. im going to start from scratch
is this your forked repo?
no thats the client repo with .next, node_modules and package.lock deleted
what you mean client repo?
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
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
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)
try to do that...
not its not nested. here is file structure
the components/files is basically a online file manager
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