Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failing #11

Open
yeahIamblonde opened this issue Jul 16, 2022 · 1 comment
Open

Build failing #11

yeahIamblonde opened this issue Jul 16, 2022 · 1 comment

Comments

@yeahIamblonde
Copy link

yeahIamblonde commented Jul 16, 2022

Trying to build to see if I can use this in my project. Not very familar with typescript. Gettiing:
yarn run v1.22.19
$ next build
info - Loaded env from /home/git/siwe-next-auth-example/.env.local
Failed to compile.

./pages/api/auth/[...nextauth].ts:8:36
Type error: Parameter 'req' implicitly has an 'any' type.

6 | // For more information on each option (and a full list of options) go to
7 | // https://next-auth.js.org/configuration/options

8 | export default async function auth(req, res) {
| ^
9 | const providers = [
10 | CredentialsProvider({
11 | name: "Ethereum",
error Command failed with exit code 1.

@based64-eth
Copy link

You need to declare the types for the parameters of the auth function, as described in the Next.js docs here: https://nextjs.org/docs/basic-features/typescript#api-routes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants