I'm having trouble using the
"lint": "./node_modules/.bin/eslint --ignore-pattern dist ."
npm run lint
yarn run lint
Petesta :: λ -> ~/Git/yarn yarn run lint
yarn run v0.15.1
$ "./node_modules/.bin/eslint --ignore-pattern dist ."
sh: ./node_modules/.bin/eslint --ignore-pattern dist .: No such file or directory
error Command failed with exit code 127.
info Visit http://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn run some_script_on_date
./node_modules/.bin/eslint --ignore-pattern dist .
chmod +x ./scripts/lint.sh
yarn run new_lint
I found an issue which I believe is related: https://github.com/yarnpkg/yarn/pull/809.
yarn did not understand spaces in npm scripts. I guess this will be fixed in next release. I can reproduce the issue on my computer (using latest yarn: 0.15.1).
By the way, you do not have to include
./node_modules/.bin in your npm scripts. Both npm and yarn will look inside that folder by default, as explained here: https://docs.npmjs.com/cli/run-script
So your script can be only:
"lint": "eslint --ignore-pattern dist ."