'How can i update npm without error? (npm ERR! cb.apply is not a function)

I accidently downgraded npm for a project and i cannot upgrade npm back.

node: v16.13.2 npm: 4.6.1

I tried this

npm install -g npm@latest

but it gives me this error

npm ERR! cb.apply is not a function


Sources

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

Source: Stack Overflow

Solution Source