when I am using command npm install -g lerna
it gets executed with no error but after that using command
lerna --version
gives output "lerna:command not found".
Possible solution
maybe if somehow I manage it to install in usr/local/lib/node_modules
it should work cause other npm packages installed here are working fine but its getting installed in /home/surajkulriya/.npm-global/lib/node_modules
.
OS: ubuntu 18.04
which npm:/usr/local/bin/npm
which node:/usr/local/bin/node
which nodejs:/usr/bin/nodejs
Finally after too much effort I sorted out the issue. I removed node nodejs and npm completely and reinstalled them again and used command
to fix the broken dependecies.I reinstalled lerna and it worked.