Reputation: 6831
I installed karma locally using
npm install karma --save-dev
and then i tried
$ ./node_modules/karma/bin/karma start
Then i get this error
vagrant@development:$ ./node_modules/karma/bin/karma start
-bash: ./node_modules/karma/bin/karma: Permission denied
vagrant@development:$ ls -liah ./node_modules/karma/bin/
total 4.0K
54696 drwxrwxr-x 1 vagrant www-data 102 Nov 17 19:24 .
54688 drwxrwxr-x 1 vagrant www-data 544 Nov 17 15:57 ..
54697 -rw-rw-r-- 1 vagrant www-data 50 Nov 15 02:43 karma
What can be the reason
http://karma-runner.github.io/0.12/intro/installation.html
vagrant@development:$ sudo chmod +x ./node_modules/karma/bin/karma
vagrant@development:$ ls -liah ./node_modules/karma/bin/
total 4.0K
54696 drwxrwxr-x 1 vagrant www-data 102 Nov 17 19:24 .
54688 drwxrwxr-x 1 vagrant www-data 544 Nov 17 15:57 ..
54697 -rw-rw-r-- 1 vagrant www-data 50 Nov 15 02:43 karma
Upvotes: 1
Views: 1707
Reputation: 2935
Your ./node_modules/karma/bin/karma
executable does not have execution privileges for your user. You can chmod
it to give you the right privileges with:
$ chmod +x ./node_modules/karma/bin/karma
To avoid this in the future, simply install it with npm install -g karma-cli
(globally).
Upvotes: 5