I downloaded node.js from nodejs.org ,today i tried to check my npm version(from cmd prompt /windows power shell/ vs code) but it was giving me same error but when i tried it from node.js cmd prompt it works fine i wanted to resolve error in vs code and cmd
node.js cmd prompt (here it works)
I thought that there may be some problem in path I tried several path but nothing changed
2
Answers
I had to install nvm and it solved my problem there may be error because of space in my username
I guess it’s the problem with your path.
Try deleting this path —
C:UserssandeAppDataRoamingnpmnode_modulesnpm
Also, try restarting your PC.