Go This Location C:\Users\UserName\AppData\Roaming\ and create folder with exact name npm. After that restart Vs Code and Retry. The Error will be Solved.
If you don't find the AppData folder just Go to folder option and Tick the Show hidden folders Option