-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yarn run command doesn't wok in 1.6.0 and 1.7.0 #6086
Comments
I have same issue on yarn 1.7.0, using powershell as script-shell.
In my opinion, Lines 85 to 92 in 1711e72
...and yarn/src/util/execute-lifecycle-script.js Lines 280 to 298 in 1711e72
Then, yarn/src/util/execute-lifecycle-script.js Line 224 in 1711e72
Lines 61 to 74 in 1711e72
This |
I just did the same digging as @tkamenoko and came to the same conclusion. Initially, I thought that Yarn is not working in Git Bash (or MSYS2 mingw shell in my case) but it turned out to be the problem with In my case:
I tried putting this into
which probably isn't how
|
Thanks @tkamenoko and @borekb for investigating on this. @tkamenoko But when i run in the cmd.exe I'm getting below error.
I check on one of my colleague machine and it's working fine on 1.7.0. I have a hunch that it is related to my profile name which has white space "Shabith Ishan" because that is the first noticeable different I saw with his setup. |
@shabith Do you mean you run the command in cmd.exe, or that cmd.exe is set as your |
@borekb I meant once I run the command in cmd.exe. |
no luck with Yarn 1.9.2 as well 😞 Same behavior for me. |
After some research, it seems that this is actually an issue with Yarn uses node's child_process.spawn You can reproduce this without yarn at all by creating a file
and run it while in mingw (git-bash) with:
I suspect this is because node is trying to run You could just remove The way we spawn scripts in yarn changed around 1.6.0 to fix various other issues on windows, so changing it back would reintroduce other issues. We hoped node would have had this kind of thing covered :( edit: This is the node.js source for
So when there is a |
Thanks for investigation on this. I checked for yarn configuration using Like you have explained it seems like issue is with EDIT |
The issue is probably fixed by nodejs/node#21943. As it's tagged |
That's a good news @borekb |
@shabith BTW, shouldn't it be |
removed shell-script=bash from .npmrc and it works fine! thanks guys, im writing this comment in case I need to find this thread again. |
Couldn't find the binary yarn ts-node inquirer.ts ? Help :( |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
yarn run {command}
is not working properly in yarn version 1.6.0 and 1.7.0If the current behavior is a bug, please provide the steps to reproduce.
I tried to execute yarn run script in last 3 version of yarn and realize that last two version gives 2 different errors and it only works in yarn 1.5.1
Please have a look at below screenshot to
Version 1.7.0 - not working.
Version 1.6.0 - not working.
Version 1.5.1 - working.
repo to reproduce the error - https://github.com/shabith/yarn-run-bug
What is the expected behavior?
yarn run {command}
to work in latest version.Please mention your node.js, yarn and operating system version.
git version - 2.16.2.windows.1
node version - 8.11.2
OS - Windows 10
terminal - Git bash
Yarn installed via choco without node.js -
choco install yarn --ignore-dependecies
The text was updated successfully, but these errors were encountered: