1

When installing node.js for the first time and using the YEOMAN library, I found that it did not recognize the library despite installing it correctly.

When executing in console

yo swaggerize

Returns the error "yo it is not recognized as an internal or external command, program or batch file executable"

After several laps the problem is in node.js and in the PATH.

I post the solution in the next post.

  • 1
    Possible duplicate of [Setting Windows PowerShell path variable](https://stackoverflow.com/questions/714877/setting-windows-powershell-path-variable) – svgrafov Dec 14 '17 at 13:18

2 Answers2

0

The solutión for me, it's simple.

In windows-> go to pc properties->advanced configuration-> environment variables

Show Path variable and edit.

  • C:\Users\youruser\AppData\Roaming\npm;
  • C:\Program Files\nodejs;

Save restart your console and run the command again

  • I tried but it didn't work for me. and in C:\Users\user\AppData\Roaming\npm : this folder is empty. Is this the normal case or something wrong in my system. – asifaftab87 Jan 21 '18 at 06:15
0

Each and every thing was fine only problem was path so I set path in environment variable.

This path I set in environment variabel

C:\Users\user\.npm-packages

where 'user' is my user name, please use your user name.

Then my 'yo', 'bower' command start to executed Thanks

asifaftab87
  • 1,315
  • 24
  • 28