Next.js Discord

Discord Forum

@/auth is not defined in Docs

Unanswered
Greenish Elaenia posted this in #help-forum
Open in Discord
Greenish ElaeniaOP
https://nextjs.org/docs/pages/building-your-application/authentication#implementing-authentication

In this docs, line #2
import { signIn } from '@/auth'

Shows error in VSCode
Cannot find module '@/auth' or its corresponding type declarations.ts(2307)

My package.json is

{
"name": "baoyan",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev -p 3001",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@vercel/postgres": "^0.7.2",
"bcrypt": "^5.1.1",
"next": "14.1.0",
"react": "^18",
"react-dom": "^18",
"react-share": "^5.1.0"
},
"devDependencies": {
"@types/bcrypt": "^5.0.2",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"typescript": "^5"
}
}

In the "implementing authentication" docs, it didnt say to install any auth library
How do I resolve this module import issue?

0 Replies