HotReloading not working?

I have a bizarre issue where my hot reloading isn’t working correctly and I can’t figure out where to start figuring out why not.

Video of the problem:

Repo: (It’s public so no worries)

I’ve started with a standard Redwood project, and then started adding two modules:

UseDapp & ChakraUi (Sorry can’t past the links a limit as a new user)

What I find is that I can run yarn rw dev and the project loads just fine in the browser. I can make a change, and it hot reloads just fine, but if I make another change, a second time, the hot reloading stops working and I need to restart the dev server to see the changes pop up.

I can’t imagine what I’m doing here, besides installing two modules and the fact that I did mix one javascript file (.src/common/uselocalStorage.js) I don’t get what should be stopping hot reloading from working.

1 Like

Thanks for taking the time to post this @crazyrabbitLTC Helpful. And I definitely haven’t seen something like this in a long little while. I just cloned your repo and going to take a quick look — two initial theories:

  • this has something to do with you not using the API-side yet. What if you only spin up the web server via yarn rw dev web?
  • this is a Node.js issue → any chance you’re using Node.js > v16?

Could you copy+paste the output from yarn rw info?

Update: I can’t reproduce this locally. I ran through the same steps, modified a layout and a page component, but never broke hot reload.

@danny any other thoughts about diagnosing this?

Have you tried the steps I take in the video @thedavid ? Specifically changing the /components/NFTList/NFTList.tsx component? I ask because some higher-level changes like the layout, seem to reload fine. But then changes in a component such as this one- don’t show up.

@crazyrabbitLTC At a cursory glance, I don’t believe the problem here is fast refresh or the dev tooling!

Two things:

  1. To get your project to run I had to fix some imports (mind you I’m running in gitpod):
  2. If you look at your NFTList component, it only rerenders when account changes. So even if you’ve changed the render code, maybe it doesn’t re-render the component.

Explanation here:

1 Like

Hello @danny !

Thank you so much for the explanation. So, changing the account doesn’t affect the hot reloading. It still doesn’t work.


The changes you made on the imports do seem to have made a difference. It’s really quite bizarre, but thank you! It works! I’ll keep a close eye on that in the future!

1 Like