karma command not found when karma already installed

前端 未结 9 1874
独厮守ぢ
独厮守ぢ 2021-01-30 19:49

I used node.js to install karma. My first try failed when running the following command on Terminal:

npm install -g karma

That failed so I dec

9条回答
  •  死守一世寂寞
    2021-01-30 20:33

    @mayankcpdixit gave the answer up there in a response to the OP's original question, but I'll put it here again in case anyone misses it.

    You do not need to uninstall everything, and if I had to manually add a new path link for every npm package I try to install I'd probably shoot myself.

    npm install -g karma-cli
    

    Boom. Now you have karma command lines installed. Just like Grunt.


    Edit: Please don't forget to upvote @mayankcpdixit as well, he commented directly on the original post, but didn't actually "answer" the question.

提交回复
热议问题