Skip to content
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

Running jest via yarn run breaks jest #3767

Closed
bestander opened this issue Jun 30, 2017 · 7 comments
Closed

Running jest via yarn run breaks jest #3767

bestander opened this issue Jun 30, 2017 · 7 comments

Comments

@bestander
Copy link
Member

After updating to 0.27.3 Travis started failing tests https://travis-ci.org/yarnpkg/yarn/jobs/248542037.

This can be reproduced locally:

However running jest directly works

  • ./node_modules/.bin/jest
@bestander
Copy link
Member Author

bestander commented Jun 30, 2017

Issue was introduced between 0.25 and 0.26

@bestander
Copy link
Member Author

This PR broke the tests #3536

@betalb
Copy link

betalb commented Jun 30, 2017

Is it breaking only jest run? I have the same issue with grunt. Grunt is not referenced in script section of package json and I'm launching it using following command yarn run grunt -- <task name>, it worked fine in 0.24.6

@bestander
Copy link
Member Author

If you add YARN_SILENT=0 in package.json similar to #3770, does it fix for you?
Otherwise please share how exactly grunt got broken

@betalb
Copy link

betalb commented Jun 30, 2017

Actually my issue is not solved be env variable, steps to reproduce below

  • yarn init
  • yarn add grunt
  • yarn run grunt -- --version

Expected result:

yarn run v0.24.6
$ "C:\work\repos\repo\node_modules\.bin\grunt" --version
grunt-cli v1.2.0
grunt v1.0.1
Done in 0.51s.

Actual result:

yarn run v0.27.3
$ "C:\work\repos\repo\node_modules\.bin\grunt" "--version"
'C:\work\repos\repo\node_modules\.bin\grunt" "--version' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

adding dummy record to scripts, fixes the problem

"scripts": {
    "grunt": "grunt"
}

@bestander
Copy link
Member Author

bestander commented Jun 30, 2017 via email

@betalb
Copy link

betalb commented Jun 30, 2017

sure, #3773

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants