Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-bash: jsfmt: command not found #189

Open
antonio97b opened this issue Jul 28, 2016 · 8 comments
Open

-bash: jsfmt: command not found #189

antonio97b opened this issue Jul 28, 2016 · 8 comments

Comments

@antonio97b
Copy link

antonio97b commented Jul 28, 2016

Running npm install -g jsfmt on my Mac still results in a -bash: jsfmt: command not found error in my console. Everything seems to install correctly but I just can't get any response from jsfmt. I don't have a lot of information other than that, if anyone needs anything else to help me figure out the issue then just let me know and I'll get it to you.

@jimfleming
Copy link
Contributor

Hi @antonio97b, can you uninstall jsfmt then post the full output of npm install -g jsfmt?

@antonio97b
Copy link
Author

antonio97b commented Jul 28, 2016

spawn-sync@1.0.15 postinstall $HOME/.npm-packages/lib/node_modules/jsfmt/node_modules/esformatter/node_modules/npm-run/node_modules/spawn-sync
node postinstall

$HOME/.npm-packages/bin/jsfmt -> /Users/Tony/.npm-packages/lib/node_modules/jsfmt/bin/jsfmt
jsfmt@0.5.3 /Users/Tony/.npm-packages/lib/node_modules/jsfmt
├── deep-extend@0.4.1
├── underscore@1.8.3
├── esprima@2.7.2
├── docopt@0.4.1
├── rocambole@0.7.0
├── esformatter-braces@1.2.1 (rocambole-token@1.2.1)
├── tmp@0.0.28 (os-tmpdir@1.0.1)
├── rc@1.1.6 (ini@1.3.4, strip-json-comments@1.0.4, minimist@1.2.0)
├── glob@5.0.15 (path-is-absolute@1.0.0, inherits@2.0.1, inflight@1.0.5, once@1.3.3, minimatch@3.0.2)
├── falafel@1.2.0 (isarray@0.0.1, foreach@2.0.5, object-keys@1.0.11, acorn@1.2.2)
├── escodegen@1.7.1 (estraverse@1.9.3, esutils@2.0.2, esprima@1.2.5, optionator@0.5.0, source-map@0.2.0)
├── esformatter-var-each@2.1.0 (rocambole-token@1.2.1, rocambole@0.3.6)
└── esformatter@0.9.6 (rocambole-node@1.0.0, strip-json-comments@0.1.3, debug@0.7.4, stdin@0.0.1, supports-color@1.3.1, rocambole-token@1.2.1, acorn-to-esprima@2.0.8, user-home@2.0.0, minimist@1.2.0, disparity@2.0.0, rocambole-linebreak@1.0.2, rocambole-whitespace@1.0.0, resolve@1.1.7, npm-run@2.0.0, mout@1.0.0, rocambole-indent@2.0.4, babel-traverse@6.12.0, esformatter-parser@1.0.0)

On Thu, Jul 28, 2016 at 2:33 PM, Jim Fleming notifications@github.com
wrote:

Hi @antonio97b https://github.com/antonio97b, can you uninstall jsfmt
then post the full output of npm install -g jsfmt?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#189 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ALjWReEkk-u0Wg_exzlhKAIq4bn8HX6nks5qaSAngaJpZM4JXpfS
.

@jimfleming
Copy link
Contributor

jimfleming commented Jul 28, 2016

Is /Users/Tony/.npm-packages/bin/jsfmt in your path? Do other npm -g modules work (if so, can you do a which on them to see where they're installed)?

@antonio97b
Copy link
Author

antonio97b commented Jul 28, 2016

Yes, jsfmt is located in $HOME/.npm-packages/bin/.

Bower and Ember, which I use every day, are also both located in the same directory next to jsfmt

@jimfleming
Copy link
Contributor

This sounds like an npm or a shell issue. I can continue to throw out random suggestions but it should "just work".

Does /usr/bin/env node work? It's what we use to declare the shell script.

@antonio97b
Copy link
Author

Yes, /usr/bin/env node spits me into the node shell.

@antonio97b
Copy link
Author

Jimfleming,

Is it possible I can just alias 'jsfmt' into my bash_profile. If so, what would I need to put in there?

@mikew
Copy link

mikew commented Dec 26, 2016

@antonio97b

alias jsfmt="$HOME/.npm-packages/bin/jsfmt"

That will work, but to avoid an alias for everything installed through npm you'd want:

export PATH="$HOME/.npm-packages/bin:$PATH"

Also type bower might show how you're able to run bower.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants