question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🐛 `parcel watch` in 1.5.0 stuck on "Building someFile.js..."

See original GitHub issue

I tried updating my project from parcel-bundler 1.4.1 to 1.5.0, but parcel watch doesn’t finish. I removed the cache folder manually and started the watch command (see exact CLI command below). It gets stuck at some random file, displaying ∞ Building someFile.js... forever.

The parcel build command works btw.

🎛 Configuration (.babelrc, package.json, cli command)

.babelrc:

{
  "presets": ["env", "es2015", "react"],
  "plugins": [
    "transform-class-properties",
    "transform-object-rest-spread",
    "transform-decorators-legacy",
    "transform-es3-member-expression-literals",
    "transform-es3-property-literals"
  ],
  "env": {
    "production": {
      "plugins": ["transform-remove-debugger", "transform-remove-console"]
    }
  }
}

package.json (without name etc. but all deps & scripts):

{
  "dependencies": {
    "animate.css": "^3.5.2",
    "babel-polyfill": "^6.26.0",
    "flag-icon-css": "^2.8.0",
    "immer": "^0.3.0",
    "lodash": "^4.17.4",
    "material-ui": "^1.0.0-beta.12",
    "material-ui-icons": "^1.0.0-beta.10",
    "object.values": "^1.0.4",
    "pubsub-js": "^1.5.7",
    "rc-collapse": "^1.7.6",
    "react": "16.2.0",
    "react-dom": "16.2.0",
    "react-json-view": "^1.13.0",
    "react-onclickoutside": "^6.4.0",
    "react-redux": "5.0.6",
    "react-treebeard": "^2.0.3",
    "redux": "3.7.2",
    "redux-saga": "^0.15.6",
    "redux-thunk": "^2.2.0",
    "reselect": "^3.0.1",
    "workerize": "^0.1.2"
  },
  "devDependencies": {
    "babel-eslint": "7.2.3",
    "babel-jest": "^22.0.3",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-plugin-transform-es3-member-expression-literals": "^6.22.0",
    "babel-plugin-transform-es3-property-literals": "^6.22.0",
    "babel-plugin-transform-object-rest-spread": "^6.26.0",
    "babel-plugin-transform-remove-console": "^6.8.5",
    "babel-plugin-transform-remove-debugger": "^6.8.5",
    "babel-preset-env": "^1.6.1",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "cross-env": "^5.0.2",
    "enzyme": "^2.8.2",
    "eslint": "4.1.1",
    "eslint-config-react-app": "^2.0.1",
    "eslint-plugin-flowtype": "2.34.1",
    "eslint-plugin-import": "2.6.0",
    "eslint-plugin-jsx-a11y": "5.1.1",
    "eslint-plugin-react": "^7.5.1",
    "husky": "^0.14.3",
    "identity-obj-proxy": "^3.0.0",
    "jest": "22.1.2",
    "jest-css-modules": "^1.1.0",
    "lint-staged": "^6.0.0",
    "node-sass": "^4.5.3",
    "parcel-bundler": "1.5.0",
    "prettier": "1.10.2",
    "react-test-renderer": "^16.2.0",
    "redux-mock-store": "^1.2.3",
    "sinon": "^4.1.6"
  },
  "scripts": {
    "watch": "cross-env REACT_APP_VERSION=$npm_package_version parcel watch src/index.js --out-dir ./public/static --public-url ./static/",
    "test": "jest",
    "lint": "eslint ./src",
    "pretty": "prettier --write \"src/**/*.{js,css,md,scss}\"",
    "precommit": "lint-staged",
    "prepush": "npm run test --coverage"
  },
  "lint-staged": {
    "src/**/*.{js,css,md,scss}": [
      "prettier --write",
      "git add"
    ],
    "src/**/*.js": "eslint --max-warnings=0"
  },
  "jest": {
    "rootDir": "src",
    "moduleNameMapper": {
      "\\.(css|less|scss)$": "identity-obj-proxy"
    },
    "transform": {
      "^.+\\.js$": "babel-jest",
      "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/fileTransformer.js"
    },
    "setupFiles": [
      "<rootDir>/setupTests.js"
    ]
  }
}

Used cli command: yarn watch (see script in package.json above)

🤔 Expected Behavior

I expect the parcel watch command to finish building.

😯 Current Behavior

The command is getting stuck while building.

💁 Possible Solution

No idea, sorry.

🔦 Context

I will have to stay at version 1.4.1 until the watch command works again in my project, as I heavily depend on the watch command during development.

🌍 Your Environment

Software Version(s)
Parcel 1.5.0
Node 8.9.3
npm 5.6.0
yarn 1.3.2
Operating System Microsoft Windows 10 Enterprise [Version 10.0.15063]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
jeanforthewebcommented, Mar 11, 2018

Actually fixed in #901. #900 is the issue. Already fixed a while ago, but not yet merged. Probably just upvote the PR then it should get into the next patch I guess 😃

@amykapernick Yes, it’s always random, but it’s not call time related but call count.

3reactions
DeMoorJaspercommented, Jan 24, 2018

I tried your repository and found out, that if we change the workerfarmOptions to this, it works:

let opts = {
  maxConcurrentWorkers: getNumWorkers(),
  maxCallTime: 1000,
  maxConcurrentCallsPerWorker: 2
};

this let’s a call to the remote worker time out after 1second, and retries Infinite times after a timeout and apparently it doesn’t throw a workerTimeout error or any other error, so something inside the code or worker-farm code is freezing the individual workers.

After a bit more research it’s always stuck on the same assets (mainly polyfills, so this bug has nothing to do with overworked workers or anything similar, it’s an issue within some asset processing or it’s just taking extremely long)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Empty Javascript File When Building With Parcel JS 2
I can see my Sass and JS coming in from the separate files. build will also output both index files, however, the js...
Read more >
permissions - CVE - Search Results
A path traversal vulnerability was identified in GitHub Enterprise Server that allowed remote code execution when building a GitHub Pages site. To exploit...
Read more >
🖥 CLI - Parcel
Force node modules bundling. Default: false. Available in: serve , watch , build parcel build entry.js --target node ...
Read more >
Building a basic website with Parcel - DEV Community 👩‍💻👨‍💻
Let's build a small website that can import libraries with Parcel. Tagged with html, css, javascript, opensource.
Read more >
How To Set Up a React Project With Parcel - DigitalOcean
Parcel is based on the premise that building apps with JavaScript bundlers could be easier. Webpack provides greater configurability, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found