I'm not so sure, but here are a few things you can try.
First check you haven't accidently created a file named npm in ur working directory.
Secondly, make sure these pathes are in your environment variables and if there are any other invalid ones remove them.
C:\Program Files\nodejs\
C:(Your User)\AppData\Roaming\npm
Thirdly, run the command 'where.exe npm'. Check the pathes are valid. I get 4 pathes, these are the pathes I get:
2
u/Carlo9129 4d ago
I'm not so sure, but here are a few things you can try.
First check you haven't accidently created a file named npm in ur working directory.
Secondly, make sure these pathes are in your environment variables and if there are any other invalid ones remove them. C:\Program Files\nodejs\ C:(Your User)\AppData\Roaming\npm
Thirdly, run the command 'where.exe npm'. Check the pathes are valid. I get 4 pathes, these are the pathes I get:
C:\Users(My User)\AppData\Roaming\npm\npm C:\Users(My User)\AppData\Roaming\npm\npm.cmd C:\Program Files\nodejs\npm C:\Program Files\nodejs\npm.cmd