Next.js Discord

Discord Forum

Learn Next - Chapter 15 - Login Page compiling in loop, Turbo not compiling middleware

Answered
Elm sawfly posted this in #help-forum
Open in Discord
Elm sawflyOP
Hello,
when I try to access the login page I don't receive a page. The server is compiling forever and I get no error. I sadly can't find my mistake.
I've tried it with next v. 14.0.2, older and latest canary versions. And I'm using nextauth@beta release.
https://github.com/jgrnrt/NextJSAcme
Thank you for your support


I've also had another problem, with the dashboard. When i refresh the page, the whole page loads and I don't see the static sidebar or the skeleton loaders. This only works, when I switch between the nav links, e.g. dashboard <-> invoices <-> customers
Answered by Toyger
it's some bug with
import { lusitana } from '@/app/ui/fonts';

maybe because of turbopack, or something with font itself, you need to test it with different fonts and without turbopack, maybe update to latest next release
if issue will continue to persist open a new issue on github with reproducable repo
View full answer

3 Replies

Elm sawflyOP
bump
Toyger
it's some bug with
import { lusitana } from '@/app/ui/fonts';

maybe because of turbopack, or something with font itself, you need to test it with different fonts and without turbopack, maybe update to latest next release
if issue will continue to persist open a new issue on github with reproducable repo
Answer
Elm sawflyOP
Thank you, for your reply.
I've updated to latest canary now and removed turbo, which worked.
Maybe I've found something new for devs: The /middleware doesn't compile when using turbo.

But without it loads
✓ Ready in 2.7s
✓ Compiled /middleware in 203ms (217 modules)
â—‹ Compiling / ...

And with turbo it's just ready and Compiling / .