1

When I try to run yarn run command in a project I'm getting below error in git-bash.

/d: /d: Is a directory

?[2K?[1G?[31merror?[39m Command failed with exit code 126.

However if I run it using npm run it works fine. Repo to reproduce the error - https://github.com/shabith/yarn-run-bug

Environment - Windows 10, git-bash

Things that I have already tried:

  1. Reinstall Node.js
  2. Reinstall Yarn

enter image description here

tk421
  • 5,775
  • 6
  • 23
  • 34
Shabith
  • 3,005
  • 3
  • 23
  • 20
  • I can confirm you this is working on OSx, so it probably has to do with being executed on a Windows machine. – Dez Sep 19 '18 at 11:02
  • Thanks @Dez, It must be related to my working environment then. But I'm not sure how to fix that though. – Shabith Sep 19 '18 at 12:18

1 Answers1

1

Finally found a fix to this issue.

All I had to do is delete my npm shell-script using npm config delete script-shell and it start working.

More info can be found on the bug that I have raised in github - https://github.com/yarnpkg/yarn/issues/6086#issuecomment-423361321

Shabith
  • 3,005
  • 3
  • 23
  • 20