next-auth-sanity icon indicating copy to clipboard operation
next-auth-sanity copied to clipboard

next-auth-sanity Install ERR

Open Developer-Kings-dev opened this issue 1 year ago • 7 comments

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)

Developer-Kings-dev avatar Feb 02 '24 18:02 Developer-Kings-dev

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

MokDevelopment avatar Feb 02 '24 23:02 MokDevelopment

Yea, please what should I do?

Developer-Kings-dev avatar Feb 02 '24 23:02 Developer-Kings-dev

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

MokDevelopment avatar Feb 03 '24 15:02 MokDevelopment

@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 avatar Feb 06 '24 21:02 Developer-Kings-dev

@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

Developer-Kings-dev avatar Feb 07 '24 23:02 Developer-Kings-dev

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.

fedeya avatar Feb 08 '24 01:02 fedeya

@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

anthlasserre avatar Apr 17 '24 21:04 anthlasserre