Why do I have an error "'vue' is not recognized as an internal or external command" in VS code?

So I started working with vue and I installed vue cli in visual studio code with the following command:

npm install -g @vue/cli

But when I try to create a vue app with vue create ... command, it says the following:

"'vue' is not recognized as an internal or external command"

I searched in google and added npm in the PATH, and also node js, so I don't know what can be the problem.


You're probably missing the bin path.

Have a look at 'vue' is not recognized as an internal or external command on windows #347. It includes multiple possible answers!

Possible fix: (copied from Stackoverflow answer)

get the path from npm:

npm config get prefix

and just as a future reference, this is the path I added in Windows 10:

C:\Users\{yourName}\AppData\Roaming\npm