Parcel won't stop rebuilding in dev mode
See original GitHub issue🐛 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.
💁 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) |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:23 (7 by maintainers)
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.
.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.