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
CodePudding user response:
I guess it's the problem with your path.
Try deleting this path -- C:\Users\sande\AppData\Roaming\npm\node_modules\npm
Also, try restarting your PC.
CodePudding user response:
I had to install nvm and it solved my problem there may be error because of space in my username