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

yarn run ... no longer working #735

Closed
SethDavenport opened this issue Oct 11, 2016 · 11 comments
Closed

yarn run ... no longer working #735

SethDavenport opened this issue Oct 11, 2016 · 11 comments

Comments

@SethDavenport
Copy link

SethDavenport commented Oct 11, 2016

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

package.json:

  "scripts": {
    "wat": "echo wat",
    // ...

My project has a bunch of stuff as npm scripts in package.json. Previously, with the old package name, (yarnpkg), they worked fine:

> npm install -g yarnpkg
> yarn --version
0.15.1
> yarn run wat
yarn run v0.15.1
$ echo wat
wat
✨  Done in 0.08s.

However since obeying the nice deprecation message and installing the yarn package instead, yarn run fails on everything:

> npm uninstall -g yarnpkg
> npm cache clean
> npm install -g yarn
> yarn --version
0.15.1
> yarn run wat
yarn run v0.15.1
$ "echo wat"
sh: echo wat: command not found
error Command failed with exit code 127.
info Visit http://yarnpkg.com/en/docs/cli/run for documentation about this command.

If the current behavior is a bug, please provide the steps to reproduce.

See above.

What is the expected behavior?

I would expect yarn 0.15.1 from npm install -g yarn to behave the same as yarn 0.15.1 from npm install -g yarnpkg

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

Mac OS X El Capitan 10.11.5
Node 6.3.0
Yarn 0.15.1

@cozuya
Copy link

cozuya commented Oct 11, 2016

Works fine on Windows fyi.

@pbrdmn
Copy link

pbrdmn commented Oct 11, 2016

I am seeing the same issue on macOS Sierra 10.12 (16A323), scripts defined in package.json are not being found when run from yarn.

> node -v
v6.5.0
> npm -v
3.10.3
> yarn --version
0.15.1
>  yarn start
yarn start v0.15.1
$ "react-scripts start" 
sh: react-scripts start: command not found
error Command failed with exit code 127.
info Visit http://yarnpkg.com/en/docs/cli/start for documentation about this command.

However calling the script directly executes correctly.

> yarn run react-scripts start
yarn run v0.15.1
$ "[...]/node_modules/.bin/react-scripts" start
...

@notahat
Copy link

notahat commented Oct 12, 2016

I can confirm this. OS X 10.12 with Node 6.7.0.

Yarn is attempting to run echo wat as the command, rather than echo as the command with wat as an argument.

I also came across this while testing with create-react-app. See facebook/create-react-app#896

@Daniel15
Copy link
Member

Same issue as #727

@geoffreydhuyvetters
Copy link

same here

npm run development => works fine
yarn run development => 'error Command failed with exit code 127.'

@akofman
Copy link

akofman commented Oct 12, 2016

I have the same error if I don't exec first yarn, but after running this last one successfully, yarn run is now ok.

@anakinjay
Copy link

Same exact issue:
Mac OSX Yosemite 10.10.5
node: 6.2.2

@STRML
Copy link
Contributor

STRML commented Oct 12, 2016

I believe this is fixed now that #809 was merged about 4 hours ago.

@sebmck
Copy link
Contributor

sebmck commented Oct 13, 2016

Fixed via #809.

@guitarmanvt
Copy link

See #1156 for a work-around.

@mathieutu
Copy link

I can confirm that it's still not fixed in yarn 0.19.1.. 😞
@Daniel15 @kittens any news ?

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

No branches or pull requests