How to fix the NextJS HMR(hot reload) not working error on WSL2

The Problem…

Nextjs failing to hot reload in windows environment

The Solution (The fix that worked for me)…

cp –R <source_folder> <destination_folder>e.g
cp -R /mnt/c/<your_folder_name> /home
rm –r node_modules package-lock.json

Additional Info…

sudo chown –R <username> <folder_name>

--

--

--

I am a software developer creating beautiful experiences on the web. Co-organizer: Reactjs Developer Community Kenya ||

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

React Native Navigation V2 is Here!

Switch to Angular

The importance of the compare function in angular material select

Unknown argument type ‘__attribute__’ in method -[RCTUIManager…

React Behind The Scene

Optional Chaining — Javascript

A guide to TDD a React/Redux TodoList App — Part 2

6 APIs Frontend Developers Should Know

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
RamaDevsign (Rama Ochieng)

RamaDevsign (Rama Ochieng)

I am a software developer creating beautiful experiences on the web. Co-organizer: Reactjs Developer Community Kenya ||

More from Medium

Core Web Vitals Dashboard On Google Analytics

What’s new in one.network version e2.12.0?

Experiments with Remix and Cloudflare Workers

Sounds Web Next: a “persistent player” prototype for BBC Sounds

BBC Sounds logo