gitdagray/next-js-course

Infinite loop of "Fast Refresh had to perform full reload"

Closed this issue · 1 comments

dycw commented

Hi @gitdagray ,

Thanks for a great course, I've learned so much from you. I've found myself able to go through your course – I'm up to next07 – but it seems I'm often running into this aforementioned infinite loop of Fast Refresh had to perform full reload. I don't understand what's causing it.

But certainly now my machine seems to have this behaviour where even after a reboot & fresh clone:

┌─────────────────────────────────────────────────────────── 2023-06-03 20:18:11
│ DW-Mac derek ~
│
└ ❯ cd /tmp

┌─────────────────────────────────────────────────────────── 2023-06-03 20:18:15
│ DW-Mac derek /tmp
│
└ ❯ git clone https://github.com/gitdagray/next-js-course.git
Cloning into 'next-js-course'...
cd neremote: Enumerating objects: 338, done.
remote: Counting objects: 100% (338/338), done.
remote: Compressing objects: 100% (260/260), done.
remote: Total 338 (delta 142), reused 240 (delta 44), pack-reused 0
Receiving objects: 100% (338/338), 867.77 KiB | 5.23 MiB/s, done.
Resolving deltas: 100% (142/142), done.

┌─────────────────────────────────────────────────────────── 2023-06-03 20:18:38
│ DW-Mac derek /tmp
│
└ ❯ cd next-js-course

┌─────────────────────────────────────────────────────────── 2023-06-03 20:18:39
│ DW-Mac derek .../next-js-course  main
│
└ ❯ cd next01

┌─────────────────────────────────────────────────────────── 2023-06-03 20:18:42
│ DW-Mac derek .../next-js-course/next01  main
│
└ ❯ la
Permissions Size User  Group Date Modified    Git Name
drwxr-xr-x@    - derek wheel 2023-06-03 20:18  -- app/
drwxr-xr-x@    - derek wheel 2023-06-03 20:18  -- pages/
drwxr-xr-x@    - derek wheel 2023-06-03 20:18  -- public/
.rw-r--r--@   40 derek wheel 2023-06-03 20:18  -- .eslintrc.json
.rw-r--r--@  393 derek wheel 2023-06-03 20:18  -- .gitignore
.rw-r--r--@  134 derek wheel 2023-06-03 20:18  -- next.config.js
.rw-r--r--@ 219k derek wheel 2023-06-03 20:18  -- package-lock.json
.rw-r--r--@  492 derek wheel 2023-06-03 20:18  -- package.json
.rw-r--r--@ 1.7k derek wheel 2023-06-03 20:18  -- README.md
.rw-r--r--@  658 derek wheel 2023-06-03 20:18  -- tsconfig.json

┌─────────────────────────────────────────────────────────── 2023-06-03 20:25:10
│ DW-Mac derek .../next-js-course/next01  main ?
│
└ ❯ npm i && npm run dev

added 270 packages, and audited 271 packages in 2s

102 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> next01@0.1.0 dev
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
warn  - You have enabled experimental feature (appDir) in next.config.js.
warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.

info  - Thank you for testing `appDir` please leave your feedback at https://nextjs.link/app-feedback
info  - VS Code settings.json has been updated for Next.js' automatic app types, this file can be added to .gitignore if desired
event - compiled client and server successfully in 887 ms (246 modules)
wait  - compiling /_error (client and server)...
event - compiled client and server successfully in 44 ms (247 modules)
wait  - compiling /page (client and server)...
Error [NextFontError]: Failed to fetch `Inter` from Google Fonts.
    at nextFontError (/private/tmp/next-js-course/next01/node_modules/@next/font/dist/utils.js:55:17)
    at downloadGoogleFonts (/private/tmp/next-js-course/next01/node_modules/@next/font/dist/google/loader.js:87:39)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /private/tmp/next-js-course/next01/node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js:52:93
    at async Span.traceAsyncFn (/private/tmp/next-js-course/next01/node_modules/next/dist/trace/trace.js:79:20)
error - Failed to download `Inter` from Google Fonts. Using fallback font instead.
event - compiled client and server successfully in 76s (528 modules)
wait  - compiling...
event - compiled successfully in 0 ms (310 modules)
event - compiled successfully (300 modules)
warn  - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
warn  - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
warn  - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
warn  - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
warn  - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
...

Any idea what might be causing this, or how to debug? The NextJS link doesn't seem helpful.

dycw commented

Please ignore this. This has become a much more general problem than I've thought. Filed under vercel/next.js#40184 (comment).