Next.js Discord

Discord Forum

errors when trying to import NextAuth (nextjs typescript, )

Philadelphia Vireo posted this in #help-forum
Open in Discord
Philadelphia VireoOP
In my next application under "pages/api/auth/[...nextauth].ts" i've tried to import NextAuth with: "import { NextAuth } from 'next-auth';".

The last part of this import appears with a red line as seen in the screenshot within this post. (I have already done "npm install next-auth" & and restarted visual studio) . I have includes a screenshot of my hierachry.

In my tsconfig.json, i have red lines on the following lines: ""moduleResolution": "bundler",
"resolveJsonModule": true, " (see screenshot)

What am i doing wrong here? My goal is to implement Google with nextauth for authentication. Thanks!

0 Replies