Search code examples
javascriptnode.jscordovanpm

"cordova" is not recognised as a cmdlet name


I installed Cordova with this command using npm:

npm install -g cordova

Cordova is now installed, the files and the folder appear in %appdata%/npm and %appdata%/npm/node_modules but whenever I try to execute any Cordova command through the VS Code terminal it gives an error that says:

"cordova" is not recognised as cmdlet name

When I execute commands through PowerShell it still gives and error but it's slightly different and it says:

"cordova" is not recognised as internal command

I tried reinstalling cordova and reinitializing NPM, nothing worked.


Solution

  • The solution was to add "C:\Users\User\AppData\Roaming\npm\node_modules\cordova\bin" path in the PATH system variable.