Closed LeonardFollner closed 6 years ago
looked a little bit into it and in the method _displayYarnScripts this command works:
Object.keys($(npm run --json))
and with yarn it doesnt
Object.keys($(yarn run --json))
so looks likes yarn does something different and because of that this doesn't work :/ workarround for now is that I just replaced the yarn with npm, but the running is still with yarn. So only checks the package.json with npm but it is still executing with yarn.
I have the same issue. The script apparently pipes yarn run --json
through sed '4!d'
, effectively deleting the first 4 lines, but my yarn run --json
output is as follows:
(node:18195) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
{"type":"error","data":"No command specified."}
{"type":"info","data":"Commands available from binary scripts: acorn, ansi-html, atob, babylon, browserslist, cssesc, csso, detect, detect-libc, detect-port, errno, escodegen, esgenerate, eslint, esparse, esvalidate, flow, handlebars, he, html-minifier, import-local-fixture, internal-ip, is-ci, jest, jest-runtime, js-yaml, jsesc, json5, loose-envify, miller-rabin, mime, mkdirp, multicast-dns, needle, node-pre-gyp, nopt, rc, react-scripts, regjsparser, rimraf, sane, semver, sha.js, sshpk-conv, sshpk-sign, sshpk-verify, strip-indent, svgo, sw-precache, uglifyjs, uuid, webpack, webpack-dev-server, which"}
{"type":"info","data":"Project commands"}
{"type":"list","data":{"type":"possibleCommands","items":["build","eject","start","test"],"hints":{"build":"react-scripts build","eject":"react-scripts eject","start":"react-scripts start","test":"react-scripts test --env=jsdom"}}}
{"type":"error","data":"No command specified."}
So the sed yields {"type":"info","data":"Project commands"}
instead of the list
line.
Tapping [yarn-run] results in the following error displayed on the console:
I do run
export YARN_ENABLED=true
in my.zshrc
. Usingnpm-run
either displays no scripts or everything works fine. I am running the latest version of zsh, oh-my-zsh, iTerm2 and zsh-iterm-touchbar is freshly cloned to~/.oh-my-zsh/custom/plugins/