xxxxxxxxxx
Restart your vscode.
If the problem still persists like me: Restarting your computer should fix it.
xxxxxxxxxx
Just add:
;C:\Program Files\nodejs\
To the end of your Path variable on the "User variable" section of the Environment Variables on the System Properties.
After that, reopen your command prompt and type
npm
This should work.