Karma.js installation - bash: karma: command not found

So I have installed node.js from nodejs.org and I have installed karma.js in my project using the Webstorm command tool: npm install karma. I have also added those 3 path variables (please tell me which one I don't need) in Webstorm->Settings->Path Variables.
Name: nodejs Value: /usr/local/bin
Name: npm Value: /usr/local/lib/node_modules/npm/bin
Name: karma Value: /Users/maxime/Documents/WebStorm/icms/node_modules/karma/bin
When I type init karma to get the karma config file, I get: bash: karma: command not found
I search on the site for some answers, but all I found was to add those path variables...
EDIT: I tried with sudo but it does not work
EDIT: It works with /Users/maxime/Documents/WebStorm/icms-dev-39534/node_modules/karma/bin/karma init, but it's still not working with karma init.

3 comments
Comment actions Permalink

Hi there,

I'm only gonna comment on this (since I'm not Karma or JS person).

I have also added those 3 path variables (please tell me which one I don't need) in Webstorm->Settings->Path Variables.

You got this completely wrong -- the "Settings | Path Variables" screen does completely DIFFERENT thing.


P.S.
Could be useful (unsure): Make GUI apps environment the same as in Terminal per this answer

How do you run your "karma init" command? I mean -- what functionality: Command Line Tools support ... or built-in Terminal ?

0
Comment actions Permalink

You got this completely wrong -- the "Settings | Path Variables" screen does completely DIFFERENT thing.

Sorry, I don't understand what you mean. I thought Settings->Path Variables what to set path variables?

0
Comment actions Permalink
I thought Settings->Path Variables what to set path variables?

Yes. But did you checked what it actually mean in IDE context? It does not affect your environment in any way -- it meant to simplify using the same project on different computers (or move project from one computer to another), where the same tool/folder may be located on completely different locations.

http://www.jetbrains.com/webstorm/webhelp/path-variables.html

0

Please sign in to leave a comment.