yarn run is silent on Git Bash (Windows)

Created on 15 Oct 2016  路  8Comments  路  Source: yarnpkg/yarn

Do you want to request a _feature_ or report a _bug_?

Bug: Running yarn run <something> does not show output when using Git Bash on Windows.

What is the current behavior?

Currently, running yarn run build outputs Yarn's version and the command npm-watch (in my case). If an error occurs during the watch process, there is no way to identify it.

yarn-bug-1

What is the desired behavior?

The output should be shown like it is when running the same command via the Windows Command Prompt.

Please mention your node.js, yarn and operating system version.

Node 4.2.6; Yarn 0.15.1; Git 2.9.2 64-bit; Windows 10

cat-bug os-windows triaged

Most helpful comment

I fixed this by updating my git for windows to the latest version, it looks to be a problem with winpty.exe I also updated to the latest nightly version of yarn v0.20.0 as there was a patch concerning this applied in version 0.19.

node.js - v6.9.4 | yarn - v0.20.0-20170117.1018 | git for windows - 2.11.0.3 with MinGW teminal

All 8 comments

Hi @mikerockett! Is it possible to provide a package.json that replicates the issue? Thanks!

@Daniel15 - Sure:

{
  "name": "epanel-assets",
  "version": "0.0.4",
  "description": "ePanel Asset Container/Builder",
  "author": "Mike Rockett",
  "license": "MIT",
  "devDependencies": {
    "node-sass": "^3.10.1",
    "npm-watch": "^0.1.6"
  },
  "scripts": {
    "sass": "node-sass --source-map true --include-path src/scss --output-style compressed src/scss/epanel.scss build/css/epanel.css",
    "build": "npm-watch"
  },
  "watch": {
    "sass": {
      "patterns": [
        "src/scss"
      ],
      "extensions": "scss"
    }
  }
}

Thanks 馃憤

@Daniel15 - have you been able to replicate my issue?

Are you sure it's silent? It sure behaves weird, but in my case run scripts is really slow with Git Bash. And it get slower and slower until it freezes if I trigger run scripts inside run scripts. Like "start": "yarn run clean && yarn run dev-server. Works like a charm with Windows Command though.

@faddee - It defintely works, there is just no console output. I'm not experiencing any lagging here - the process runs smoothly. Although, it does sometimes take a while to start, but that's only on first run after bootup.

Is this possibly due to the same issue mentioned in #743? I've come across the same problem (Node 7.4.0; Yarn 0.18.1; Windows 7). In my case, I have two scripts that look something like "test": "jest" and "build": "webpack" defined in my package.json. Both scripts run fine when using yarn run from CMD, but only the build script works correctly when using yarn run from Git Bash (I should also point out that the test script fails to complete when using yarn test in Git Bash as well).

I fixed this by updating my git for windows to the latest version, it looks to be a problem with winpty.exe I also updated to the latest nightly version of yarn v0.20.0 as there was a patch concerning this applied in version 0.19.

node.js - v6.9.4 | yarn - v0.20.0-20170117.1018 | git for windows - 2.11.0.3 with MinGW teminal

Looks like this is a configuration issue

Was this page helpful?
0 / 5 - 0 ratings