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
Works fine on Windows fyi.
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
...
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 https://github.com/facebookincubator/create-react-app/issues/896
Same issue as #727
same here
npm run development => works fine
yarn run development => 'error Command failed with exit code 127.'
I have the same error if I don't exec first yarn, but after running this last one successfully, yarn run is now ok.
Same exact issue:
Mac OSX Yosemite 10.10.5
node: 6.2.2
I believe this is fixed now that https://github.com/yarnpkg/yarn/pull/809 was merged about 4 hours ago.
Fixed via #809.
See #1156 for a work-around.
I can confirm that it's still not fixed in yarn 0.19.1.. 😞
@Daniel15 @kittens any news ?
Most helpful comment
I believe this is fixed now that https://github.com/yarnpkg/yarn/pull/809 was merged about 4 hours ago.