next-learn icon indicating copy to clipboard operation
next-learn copied to clipboard

Login gives error 404.

Open orbian opened this issue 1 year ago • 1 comments

I just installed the tutorial project and started it. The home page comes up on http://localhost:3000 but clicking the login button gives error 404. Capture

The log shows:

C:\Work\react\next\nextjs-dashboard>pnpm dev

> @ dev C:\Work\react\next\nextjs-dashboard
> next dev

  ▲ Next.js 15.0.0-canary.56
  - Local:        http://localhost:3000

 ✓ Starting...
 ✓ Ready in 2.6s
<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: ENOENT: no such file or directory, rename 'C:\Work\react\next\nextjs-dashboard\.next\cache\webpack\client-development\0.pack.gz_' -> 'C:\Work\react\next\nextjs-dashboard\.next\cache\webpack\client-development\0.pack.gz'
 ○ Compiling / ...
 ✓ Compiled / in 2.4s (490 modules)
 GET / 200 in 2720ms
 ○ Compiling /_not-found ...
 ✓ Compiled /_not-found in 943ms (493 modules)
 GET /login 404 in 1035ms
 GET /login 404 in 78ms

I am assuming that the /login page should exist already. I didn't see anything while skimming over the tutorial. It just goes directly into styling.

orbian avatar Aug 08 '24 22:08 orbian

i had the same issue. the problem was creating the wrong file name in this part: https://nextjs.org/learn/dashboard-app/adding-authentication#creating-the-login-route

Mahdyrll avatar Aug 23 '24 19:08 Mahdyrll