error in using installed packages via npm with -g

0

I installed npm install typescript -g and npm install @angular/cli -g and I'm not accessing tsc and ng .

'ng' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.

'tsc' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.

the files ng.cmd and tsc.cmd are inside this folder

C:\Users\myUserName\AppData\Roaming\npm

environment variables Path

C:\Program Files\nodejs

C:\Users\myUserName\AppData\Roaming\nvm

NODE_PATH:

C:\Users\myUserName\AppData\Roaming\npm\node_modules

NVM_HOME:

C:\Users\myUserName\AppData\Roaming\nvm

NVM_SYMLINK:

C:\Program Files\nodejs

Installed node folder:

C:\Program Files\nodejs

windows 10 Home

node: v8.10.0

npm: 5.6.0

  

Solution

     

Thanks to all who responded, after some adjustments I ended up   getting it right.

     

The name of the varial Path to PATH .

     

Then add the path C:\Users\USUARIO\AppData\Roaming\npm .

     

I restarted and resumed the tsc and ng commands

    
asked by anonymous 24.04.2018 / 00:29

1 answer

0

Are you using the default Windows CMD or Power Shell? Sometimes using cmder or even git bash resolves ... Or maybe use the VS Code .

    
25.04.2018 / 16:05