Configuring Development Variables
If you have this error, seven development variables.
- Right-click on
computador -> propriedades -> configurações avançadas... -> variáveis de ambiente
.
- In the system variable named:
path
edit it. and place the path where your npm is installed, it is usually at this location:% s % but still there Obs: be careful not to remove the directories old, to 'concatenate' with the other directories just insert a C:\Users\{USUARIO}\AppData\Roaming\npm\npm
(semicolon) after the last one, and so insert the location of your npm.
Editing the windows registry
-
Go to ;
-
If you have something on the right side like: Enabled, click and edit the value for iniciar -> regedit -> HKEY_CURRENT_USER -> Software -> Microsoft -> windows script(pode estar outro nome, mas parecido)->settings
, otherwise, create one with 1
, Enabled name and value 1. Close all open prompts and open again.
Always remember to start the prompt as an administrator.
- That directory I said at the beginning:
botao direito -> novo -> DWORD
, it by default comes like this: C:\Users\{USUARIO}\AppData\Roaming\npm\npm
, this semicolon C:\Users\{USUARIO}\AppData\Roaming\npm;npm\npm
, at the time of setting the varivaeis environment can be disrupted because it serves to 'concatenate' values within that variable. Replace npm;npm
with npm;npm
, make change in environment variables, and done.
Once this is done, if your prompt is open, close it and open it again for the changes to take effect. Now to check if the error persists, just type npm
.