When I installed testcafe with command sudo npm install -g testcafe
I was able to use the command "testcafe" in the terminal, running tests like testcafe browser test
, but now I formatted my OS and installed it with just npm install
with the packege.json of my project and when I try to use "testcafe" command to run tests I get the message testcafe: command not found
.
Now I'm able to run tests just if I call the node module, like /usr/bin/node node_modules/testcafe/bin/testcafe.js browser test
It seems that the "testcafe" command alias to call the node module was not created when I installed it with just npm install
.
Any thoughts on how can I fix it or why this happened?