iam4x / zsh-iterm-touchbar

Display feedback of terminal in the 🍏 Touchbar
MIT License
689 stars 75 forks source link

Yarn run error #14

Closed Remeic closed 6 years ago

Remeic commented 7 years ago

Reporting error when i try to run "yarn run" from touch bar, if i execute from zsh all works perfectly

console.log({"type":"info","data":"Project commands"}.data.items.filter(name => !name.includes(':')).sort((a, b) => a.localeCompare(b)).filter((name, idx) => idx < 12).join(' ')) ^

TypeError: Cannot read property 'filter' of undefined at eval:1:65 at ContextifyScript.Script.runInThisContext (vm.js:50:33) at Object.runInThisContext (vm.js:139:38) at Object. (eval-wrapper:6:22) at Module._compile (module.js:624:30) at evalScript (bootstrap_node.js:461:27) at startup (bootstrap_node.js:163:9) at bootstrap_node.js:607:3

timbru31 commented 6 years ago

Have you installed yarn? I've had the same issue when yarn was not installed, but a yarn.lock was present.

Remeic commented 6 years ago

@timbru31 yes, yarn is installed, i use it instead of npm

presidenten commented 6 years ago

I have the same issue. I am also running yarn instead of npm. Im running yarn version 1.3.2 installed through brew.

[eval]:1
console.log({"type":"info","data":"Project commands"}.data.items.filter(name => !name.includes(':')).sort((a, b) => a.localeCompare(b)).filter((name, idx) => idx < 12).join(' '))
                                                                ^

TypeError: Cannot read property 'filter' of undefined
    at [eval]:1:65
    at ContextifyScript.Script.runInThisContext (vm.js:25:33)
    at Object.exports.runInThisContext (vm.js:77:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:570:32)
    at Immediate.<anonymous> (bootstrap_node.js:357:29)
    at runCallback (timers.js:649:20)
    at tryOnImmediate (timers.js:622:5)
    at processImmediate [as _immediateCallback] (timers.js:594:5)
iam4x commented 6 years ago

You can now set YARN_ENABLED=false to force the use of npm 👍

Remeic commented 6 years ago

Sorry @iam4x , but if i want use yarn instead npm? In the Digital agency where i work, we have replaced npm with yarn