Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Next.js: Infinite Fast Refresh loop Error #87

Closed
surjithctly opened this issue Mar 17, 2021 · 6 comments
Closed

Next.js: Infinite Fast Refresh loop Error #87

surjithctly opened this issue Mar 17, 2021 · 6 comments

Comments

@surjithctly
Copy link

I installed tailwind-jit on a fresh create-next app. when I run yarn dev it goes in to an infinite loop of fast refresh.

Here's a GIF to understand what I mean:

eeeeee
eerrrreeee

Debug Info:

  • Fresh Create-Next-App
  • Windows 10
  • Node 14.16.0

Next.js does not provide much debug error here, so not sure what's the real cause. If you need any further debug info, let me know how I can grab those.

Thanks a lot.

@bradlc
Copy link
Contributor

bradlc commented Mar 17, 2021

Please could you provide a repository that reproduces the issue?

@surjithctly
Copy link
Author

Hey @bradlc I tried to run it on a codesandbox and it worked fine there.

So, it appears only in Windows 10 (Node 14.16.0)

The app is a fresh create-next-app with JIT installed. Nothing else.

@bradlc
Copy link
Contributor

bradlc commented Mar 17, 2021

It works fine for me on Windows 10 and Node 14.16.0. Unfortunately it's not going to be possible to find the cause without a reproduction.

@marcfilleul
Copy link

Hi,
@surjithctly, I had a similar issue with eleventy and just solved it.

Following the documentation, I initially added the dist/public folder in my tailwind purge config (below is the documentation example):

purge: [
    './public/**/*.html',
    './src/**/*.{js,jsx,ts,tsx,vue}',
  ],

By simply removing the public folder form it, the infinite loop has stopped.

By the way, I wonder what is the purpose of adding the public folder here?

@surjithctly
Copy link
Author

Wow.. @marcfilleul That was an easy fix. Thanks a million, dude.

It did fix my issue. been scratching my head for the last two days, as it was working fine on a codesandbox.

@marcfilleul
Copy link

Happy to help, I was scratching my head too :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants