parcel: Parcel won't stop rebuilding in dev mode

๐Ÿ› bug report

Running parcel in โ€œdev modeโ€ on OS X just constantly rebuilds which triggers reloads making it impossible to work with ๐Ÿ˜ฆ

๐ŸŽ› Configuration (.babelrc, package.json, cli command)

package.json

{
  "name": "ozzie",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "parcel ./index.html",
    "test": "mocha --timeout=10000",
    "dbemulator": "firebase serve --only firestore"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "antd": "^3.20.1",
    "dotenv": "^8.0.0",
    "firebase": "^6.3.0",
    "firebase-init": "^1.3.2",
    "formik": "^1.5.8",
    "moment": "^2.24.0",
    "query-string": "^6.8.2",
    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "react-redux": "^7.1.0",
    "react-redux-firebase": "^3.0.0-alpha.13",
    "react-router-dom": "^5.0.1",
    "recompose": "^0.30.0",
    "redux": "^4.0.4",
    "redux-firestore": "^0.8.0"
  },
  "devDependencies": {
    "@babel/core": "^7.5.5",
    "@babel/plugin-proposal-class-properties": "^7.5.5",
    "@babel/plugin-transform-runtime": "^7.5.5",
    "@babel/preset-env": "^7.5.5",
    "@babel/preset-react": "^7.0.0",
    "@babel/runtime": "^7.5.5",
    "babel-loader": "^8.0.6",
    "babel-polyfill": "^6.26.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-stage-0": "^6.24.1",
    "parcel-bundler": "^1.12.3",
    "@firebase/testing": "0.10.0",
    "filesystem": "1.0.1",
    "mocha": "5.2.0",
    "should": "^13.2.3"
  }
}

.babelrc

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "targets": {
          "browsers": [
            ">0.25%",
            "not ie 11",
            "not op_mini all"
          ]
        }
      }
    ],
    "@babel/preset-react"
  ],
  "plugins": [
    "@babel/plugin-transform-runtime",
    "@babel/plugin-proposal-class-properties"
  ]
}

๐Ÿค” Expected Behavior

It should only rebuild and reload when I save a file.

๐Ÿ˜ฏ Current Behavior

Constantly rebuilding and causing refreshing. The gif below you can see. Iโ€™m doing absolutely nothing but sitting and watching my terminal.

rebuild

๐Ÿ’ Possible Solution

Maybe not a solution per se but itโ€™d be nice to get some info on what is causing this refresh. Something is triggering a โ€œchangeโ€ event, but what?

๐Ÿ”ฆ Context

Just a brain dump but Iโ€™m working in IntelliJ. I tried IntelliJโ€™s terminal and iTerm. Iโ€™ve tried deleting node_modules, dist, .cache, and package-lock. Iโ€™ve reinstalled npm modules multiple times.

๐Ÿ’ป Code Sample

I canโ€™t publicly share the code but itโ€™s a pretty simple React app that uses Firebase and Firestore.

๐ŸŒ Your Environment

Software Version(s)
Parcel 1.12.3
Node 10.16.0
npm/Yarn 6.9.0
Operating System Mac OS 10.14.1 (18B75)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 23 (8 by maintainers)

Most upvoted comments

I create a new example from scratch on my system and now works perfectly.

I have been working fine with no problems for a while. Sometimes, when write an import to a .js file and save, infinite looping has started.

  • If I break (CTLR-C) and restart Parcel, it continues loop.
  • If I delete the .parcel-cache folder and restart Parcel, works correctly again.

Had the same issue today on OSX.

I was able to fix it by moving my project into a directory that is not synced with iCloud Drive.

I create a new example from scratch on my system and now works perfectly.

I have been working fine with no problems for a while. Sometimes, when write an import to a .js file and save, infinite looping has started.

  • If I break (CTLR-C) and restart Parcel, it continues loop.
  • If I delete the .parcel-cache folder and restart Parcel, works correctly again.

Thank you! Completely the issue I was dealing with. Not sure what was in the cache triggering the change event, but itโ€™s simple enough to let parcel just rebuild.

I have this issue and I am not using dropbox. For me, it happened when I switched branches while parcel was running. Even after switch complete, the issue still happens

When i ctrl c i get: @parcel/reporter-dev-server: Could not send success event to devserver because it does not exist.