module not found error
I am getting module not found error after i tried to implement a login function.
13 Replies
May i ask does your package.json have these “missing” dependencies?
it seems to have them all
"dependencies": {
"@auth/prisma-adapter": "^2.7.2",
"@material-tailwind/react": "^2.1.10",
"@prisma/client": "^6.1.0",
"@prisma/generator-helper": "^6.1.0",
"@t3-oss/env-nextjs": "^0.10.1",
"@tanstack/react-query": "^5.50.0",
"@trpc/client": "^11.0.0-rc.446",
"@trpc/react-query": "^11.0.0-rc.446",
"@trpc/server": "^11.0.0-rc.446",
"bcrypt": "^5.1.1",
"crypto": "^1.0.1",
"geist": "^1.3.0",
"mock-aws-s3": "^4.0.2",
"net": "^1.0.2",
"next": "^15.1.4",
"next-auth": "5.0.0-beta.25",
"prisma-zod-generator": "^0.8.13",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"server-only": "^0.0.1",
"superjson": "^2.2.1",
"swiper": "^11.1.15",
"tls": "^0.0.1",
"zod": "^3.23.3",
"zod-prisma-types": "^3.2.1"
},
This login function
Is it from a third party lib? And if so if you comment it out what happens
this is the code. I created an endpoint for login and used the default sign in function. there was no error before i started to implement a custom login page. when i remove everything about login it still gave the same error for some reason. do you need anything else?
GitHub
GitHub - siarkonyar/loracassi
Contribute to siarkonyar/loracassi development by creating an account on GitHub.
this is the github repo btw
Delete the node module folder
And the .next
And restart the dev
i am still geting the same error
i deleted the folders and npm installed them back
In my experience, this would just be the js/ts language server freaking out
Restart the language server from there comment palette or restart vs code
I've followed the error on your code, your are wrapping a server component/operation in a client component :
page
login
(client)
uses component navbar
(client)
uses component loginStatus
(server)
uses auth
variable (in /server/auth/index
)
uses NextAuth
I don't know much about NextAuth but you should probably have a client loginStatus that uses something like useSession()
Or make /login
and navbar
server components and extract the client parts in a componenthey it worked
thanks
hey sorry to bother you but if you have time can you look at this as well?? https://discord.com/channels/966627436387266600/1328306175028105277
You don't want these in your
package.json
:
they are built into nodejs.
you don't want to be npm-squattedokay thanks!