Closed victor73 closed 11 years ago
What's the usecase for invoking esformatter, in a pipe, with the help option?
It's hanging when invoked standalone:
$ esformatter --help
Although, I can see a reason for having the --help work at the end of a pipeline as well. Let's say you invoke esformatter after a particularly long command, and esformatter complains about a bad/invalid invocation. One could simply arrow up and add a --help to get the help message. Minor point there, but --help should work on a standalone invocation as the documentation page shows.
Can you clone the repo and run bin/esformatter --help
to see if that also hangs? What node version are you running?
Currently stuck because of the following sequence:
$ git clone https://github.com/millermedeiros/esformatter Cloning into 'esformatter'... remote: Counting objects: 1062, done. remote: Compressing objects: 100% (595/595), done. remote: Total 1062 (delta 477), reused 984 (delta 412) Receiving objects: 100% (1062/1062), 188.79 KiB, done. Resolving deltas: 100% (477/477), done.
$ cd esformatter $ npm install rocambole npm http GET https://registry.npmjs.org/rocambole npm http 304 https://registry.npmjs.org/rocambole npm http GET https://registry.npmjs.org/esprima npm http 304 https://registry.npmjs.org/esprima rocambole@0.2.3 node_modules/rocambole └── esprima@1.0.3
$ node --version v0.10.15
$ bin/esformatter --help
module.js:340
throw err;
^
Error: Cannot find module 'mout/string/repeat'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.
Run npm install
without the "rocambole", that should install all the
dependencies.
Okay, so after installing all the dependencies
$ bin/esformatter --help
Usage:
esformatter [OPTIONS] <fileName>
Options:
-c, --config STRING Custom configuration object
-v, --version Display the current version
-h, --help Display help and usage details
However, when invoking 'esformatter --help' using a global npm install, it still hangs. Very odd.
$ esformatter --help
What's your OS and node.js version? Maybe it's a bug on the cli module we are using. Do you get any error message?
BTW, I pushed a new version to npm today. Maybe try to uninstall it and install again.
Was on Ubuntu 13.04 x86_64. Blew away the earlier install:
$ sudo npm uninstall -g esformatter
$ sudo npm install -g esformatter npm http GET https://registry.npmjs.org/mout npm http GET https://registry.npmjs.org/rocambole npm http GET https://registry.npmjs.org/cli npm http 304 https://registry.npmjs.org/cli npm http 304 https://registry.npmjs.org/mout npm http 304 https://registry.npmjs.org/rocambole npm http GET https://registry.npmjs.org/glob npm http GET https://registry.npmjs.org/esprima npm http 304 https://registry.npmjs.org/glob npm http GET https://registry.npmjs.org/glob/-/glob-3.2.6.tgz npm http 304 https://registry.npmjs.org/esprima npm http 200 https://registry.npmjs.org/glob/-/glob-3.2.6.tgz npm http GET https://registry.npmjs.org/minimatch npm http GET https://registry.npmjs.org/inherits npm http 304 https://registry.npmjs.org/minimatch npm http 304 https://registry.npmjs.org/inherits npm http GET https://registry.npmjs.org/inherits/-/inherits-2.0.0.tgz npm http 200 https://registry.npmjs.org/inherits/-/inherits-2.0.0.tgz npm http GET https://registry.npmjs.org/lru-cache npm http GET https://registry.npmjs.org/sigmund npm http 304 https://registry.npmjs.org/lru-cache npm http 304 https://registry.npmjs.org/sigmund /usr/bin/esformatter -> /usr/lib/node_modules/esformatter/bin/esformatter esformatter@0.0.6 /usr/lib/node_modules/esformatter ├── mout@0.5.0 ├── rocambole@0.2.3 (esprima@1.0.3) └── cli@0.4.5 (glob@3.2.6)
And that fixes it !
I'm closing it for now. Maybe later if more people have issues with it I will replace the arguments parser with something else and try to debug it. cheers.
When invoked after a pipe, esformatter seems to work fine. However, invoking the help message via -h or --help causes it to hang and the prompt does not return. Installed esformatter via npm install -g esformatter on a RHEL Linux x86_64 machine.