'npm - The system cannot find the path specified (But then shows the result)

I am using npm after installing nodejs. I have installed it once before and I just finished deleting all the components because it kept giving the error in the image below, but when I try to use npm, I keep getting errors saying.

The system cannot find the path specified.

Even though I reinstalled node, it still gives these weird errors where it says the error twice on powershell and once on cmd.

I'm so confused :( enter image description here



Solution 1:[1]

In case you are using nvm to manage your node versions. You can just change your node version and it should work. This solution worked for me.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kaustubh