fedeya / next-auth-sanity

NextAuth Adapter and Provider for Sanity
https://sanity.io/plugins/next-auth-sanity
MIT License
76 stars 21 forks source link

next-auth-sanity Install ERR #69

Open Developer-Kings-dev opened 5 months ago

Developer-Kings-dev commented 5 months ago

I tried running npm i next-auth-sanity in my VS Code terminal, but I keep getting error log of messages, please what can I do to resolve this issue. Desktop-screenshot (1)

MokDevelopment commented 5 months ago

I can confirm this happens to a fresh Next JS 14 Setup on Node.js v21.6.0

Developer-Kings-dev commented 5 months ago

Yea, please what should I do?

MokDevelopment commented 5 months ago

Hey @Developer-Kings-dev .. we spoke already on Slack regarding this issue. I was able to install the package by using this setup (next 14 latest & sanity installed in the next js project):

npx create-next-app@latest npm create sanity@latest -- --project YOUR_SANITY_PROJECT_ID --dataset production --provider google yarn add next-auth-sanity

Developer-Kings-dev commented 5 months ago

@MokDevelopment Hello good day, I tried npx create-next-app@latest npm create sanity@latest -- --project YOUR_SANITY_PROJECT_ID --dataset production --provider google yarn add next-auth-sanity it did not work, please do you have any solutions, also please is there anyway we can communicate more, so that I can share my project with you, am new to next.js

Developer-Kings-dev commented 4 months ago

@fedeya Hello good day, I tried

npx create-next-app@latest
npm create sanity@latest -- --project YOUR_SANITY_PROJECT_ID --dataset production --provider google
yarn add next-auth-sanity

it did not work, please do you have any solutions, also please is there anyway we can communicate more, so that I can share my project with you, am new to next.js

fedeya commented 4 months ago

Hi, this seems like a problem with node gyp on your machine, this library uses argon2 for passwords and token hashing and argon2 are C++ bindings, can you try installing argon2 alone? If you get an error, you may need to take a look at the Visual C++ build tools on Windows.

anthlasserre commented 2 months ago

@Developer-Kings-dev @MokDevelopment Can you, guys, double-check that you haven't exported the signUpHandler under the pages folder ? I made this mistake by following the example app here. Feel free to check the PR above.

https://github.com/fedeya/next-auth-sanity/pull/71