Vercel(Next.js): Error: No Next.js version could be detected in your project. Make sure `"next"` is installed in "dependencies" or "devDependencies"
10:44 11 Feb 2023

I'm embarrassed this error. This error situation is no Next.js version could be detected in your project.

Building sequence is here.

[23:41:09.846] Running build in Cleveland, USA (East) – cle1
[23:41:09.895] Cloning github.com/minsing-jin/web_study_2 (Branch: main, Commit: 15e242e)
[23:41:10.150] Previous build cache not available
[23:41:10.214] Cloning completed: 318.763ms
[23:41:10.328] Running "vercel build"
[23:41:10.769] Vercel CLI 28.15.3
[23:41:10.992] Your application is being built using `next build`. If you need to define a different build step, please create a `vercel-build` script in your `package.json` (e.g. `{ "scripts": { "vercel-build": "npm run prepare && next build" } }`).
[23:41:10.994] Installing dependencies...
[23:41:11.290] yarn install v1.22.17
[23:41:11.310] warning package.json: No license field
[23:41:11.318] info No lockfile found.
[23:41:11.322] warning No license field
[23:41:11.323] [1/4] Resolving packages...
[23:41:11.324] [2/4] Fetching packages...
[23:41:11.324] [3/4] Linking dependencies...
[23:41:11.329] [4/4] Building fresh packages...
[23:41:11.332] success Saved lockfile.
[23:41:11.335] Done in 0.05s.
[23:41:11.399] Error: No Next.js version could be detected in your project. Make sure `"next"` is installed in "dependencies" or "devDependencies"

And my package.json is here.

{
  "name": "portfolio_site",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start"
  },
  "dependencies": {
    "@next/font": "13.1.1",
    "autoprefixer": "^10.4.13",
    "date-fns": "^2.29.3",
    "dotenv": "^16.0.3",
    "eslint": "8.31.0",
    "eslint-config-next": "13.1.1",
    "next": "^13.1.1",
    "next-themes": "^0.2.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-lottie-player": "^1.5.4"
  },
  "devDependencies": {
    "tailwindcss": "^3.2.4"
  },
  "scripts": {
  "start": "node_modules/next/dist/bin/next start -p $PORT"
  },
  "engines": {
       "node": "16.X"
  }
}

Error detail is no next.js version could be detected in my project. And it advise me to make sure "next" is installed in "dependencies" or "devDependencies". But I installed next in "dependencies and it exist in dependencies as we can see from above. I can't solve this problem and I don't know where to start.

I tried to delete yarn.lock. But my portfolio_site file didn't exist yarn.lock in the first place.

next.js deployment vercel