'phonegap/Cordova' is not recognized as an internal command

Asked

Viewed 1,952 times

-1

'phonegap/Cordova' is not recognized as an internal or external command, a operable program, or a batch file.

I was with this error and was breaking my head, I will share to those who are having problems with the phonegap command at the prompt.

1 answer

-1


Configuring the development variables

If you are with this error, seven development variables.

  • Right-click on computador -> propriedades -> configurações avançadas... -> variáveis de ambiente.
  • In the system variable called: path edit it. and place the path where your npm is installed, it is usually at this location:
    C:\Users\{USUARIO}\AppData\Roaming\npm\npm but hold on
    Obs: careful not to remove old directories, to 'concatenate' with other directories just insert a ;(point and comma) after the last, and so insert the location of your npm.

Editing the windows registry

  • Go on iniciar -> regedit -> HKEY_CURRENT_USER -> Software -> Microsoft -> windows script(pode estar outro nome, mas parecido)->settings

  • If you have something on the right side like: Enabled, click and edit the value to 1, If not, create one with the botao direito -> novo -> DWORD, Enabled name and value 1. Close all open prompts and open again.

Always remember to start the prompt as an administrator.

  • That directory I mentioned at the beginning: C:\Users\{USUARIO}\AppData\Roaming\npm\npm, It by default comes like this: C:\Users\{USUARIO}\AppData\Roaming\npm;npm\npm, that semicolon npm;npm, at the time of setting the environment variables can disturb, because it serves to 'concatenate' the values within that variable. Replace the npm;npm for npm, make the change in the environment variables and ready.

Once this is done, if your prompt is open close it and open again for the changes to be made. Now to check if the error persists just type npm -v.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.