‘testcafe’ is not recognized as the name of a cmdlet, function, script file, or operable program

Question:

I’m trying to run testcafe chrome tests/ -e to execute my test but it throws an error saying

I’m using Visual Studio Code as IDE and PowerShell terminal for executing commands

Answer:

Locally installed packages are not automatically added to the search path. Modern npm has npx command.

should do what you need.

Alternatively you can add your command to npm scripts section as suggested in the documentation.

Take a look at this question: How to use package installed locally in node_modules? for the full discussion.

Source:

‘testcafe’ is not recognized as the name of a cmdlet, function, script file, or operable program by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply