ddopson / underscore-cli

Command-line utility-belt for hacking JSON and Javascript.
Other
1.72k stars 83 forks source link

underscore-map does not exist #26

Closed mokkabonna closed 10 years ago

mokkabonna commented 10 years ago

running one of the examples with map

echo '[1, 2, 3, 4]' | underscore map 'value+1'

I get this error

execvp(): No such file or directory
    underscore-map(1) does not exist, try --help
[2, 3, 4, 5]

Well it does also work, as it produces the right result, but I'd prefer it without the other output.

ghost commented 10 years ago

I too am having this issue. ... echo '{"foo":1, "bar":2}' | underscore map -q 'console.log("key = ", key)' execvp(): No such file or directory

underscore-map(1) does not exist, try --help

key = foo key = bar ...

toukovk commented 10 years ago

I have an issue that might be related, map (& filter, probably others also) work but write to stderr error about module. I got OS X Mavericks, Node installed with NVM. Happens also with updated Node v0.10.26 & npm 1.4.3

dyn-foo touko:~$ underscore map --data '[1, 2, 3, 4]' 'value+1'
[2, 3, 4, 5]
dyn-foo touko:~$ 
module.js:340
    throw err;
          ^
Error: Cannot find module '/Users/touko/.nvm/v0.10.19/bin/underscore-map'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
tyom commented 10 years ago

This is a compatibility issue with newer Commander.js. Setting it to fixed 1.0.5 mentioned in README fixes it for me.

reklis commented 10 years ago

Please change your package.json

» diff package-broken.json package.json
14c14
<     "commander": "*",
---
>     "commander": "1.0.5",
edi9999 commented 10 years ago

Same issue for me (eg can you please update npm ? )

budmc29 commented 8 years ago

I get the same error: node: No such file or directory. Os: Ubuntu 14.04 Latest nodejs