skip to Main Content

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 vscode terminal it gives an error that says:

"cordova" is not recognised as cmdlet name

When I execute commands through the PowerShell it still gives and error but it’s slighlty different and it says:

"cordova" is not recognised as internal command

I tried reinstalling cordova and reinitializing npm, nothing worked

2

Answers


  1. Chosen as BEST ANSWER

    The solution was to add "C:UsersUserAppDataRoamingnpmnode_modulescordovabin" path in the Path system variable


  2. Does the rest of the npm packages work for you?

    If you don’t add a global variable to the computer as they wrote you in the comment

    If so:

    Try closing and reopening PowerShell or cmd
    If it still doesn’t help, try restarting the computer. If it still doesn’t help, update here.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search