DEV Community

Cover image for JavaScript Error: Parcel Won't Stop Rebuilding in Dev Mode
Dani Schuhman
Dani Schuhman

Posted on

JavaScript Error: Parcel Won't Stop Rebuilding in Dev Mode

Photo by David Pupaza on Unsplash

While working on a little project for a course I'm doing, I was introduced to Parcel, instead of using Webpack as a bundler for front end applications. The bonus of using Parcel, is that it requires zero configuration setup. Once installed properly following the straightforward instructions on their website, you're instantly up and running without a lot of the headaches that Webpack can cause.

But when working on this project in development mode, I kept running into a strange error. Parcel should only rebuild and reload a page whenever a file is saved.

Instead, Parcel continued to rebuild over and over again. Looking in the terminal, I watched as it kept rebuilding multiple times a second, to the point that it lagged the process and eventually crashed.

Looking around the internet for a solution, I don't really understand why precisely this happens. Some of the discussion as to why the rebuild gets caught in an infinite loop mentioned this happening when running it inside Dropbox, something that I wasn't doing.

What did work to fix this error, was to delete the .parcel_cache folder and to restart parcel again. Which seems to work fine, until another build error occurs and throws the rebuild back into an infinite loop. I'm not sure what's causing the error in the cache, but for the time being, this seems to be a moderate workaround so at least getting back to coding is possible.

github issue 3481

Top comments (0)