javascriptnpmparceljsparcel

Parcel localhost server not updating


I am using the parcel (v2.0.1) localhost server with hot module replacement to develop a simple HTML/SASS/JS-based web app. The HMR is working fine most of the time, but from time to time, especially when making significant changes to the code, ALL server updating stops working -- i.e. not only does HMR not work, but I can't even get the server to reflect the changes by reloading the browser page completely or even stopping and restarting the server. To make sure I wasn't just missing something simple I made changes to the code that would DEFINITELY break certain features and restarted the server, but the page still worked as normal.

I have also tried deleting the .parcel-cache and dist folders and re-running parcel and that has not worked either. Restarting my computer has not worked either. The only mention I've seen of this problem is this github discussion.

Has anyone had a similar problem? Thanks!

Here is the package.json file:

{
  "name": "",
  "version": "1.0.0",
  "description": "",
  "source": "index.html",
  "scripts": {
    "start": "parcel index.html",
    "build": "parcel build index.html"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@parcel/transformer-sass": "^2.0.1",
    "parcel": "^2.0.1"
  },
  "dependencies": {
    "core-js": "^3.19.3",
    "fractional": "^1.0.0",
    "regenerator-runtime": "^0.13.9"
  }
}


Solution

  • I discovered that the problem (in my case, anyway) was that the project files were all in a cloud folder. Once I moved the files to my local drive everything worked!