Table of Contents
Step 1: Unlink the existing /usr/bin/node
sudo unlink /usr/bin/node
Step 2: Find the node path
whereis node
your result will be something like this,
/home/ec2-user/.nvm/versions/node/v14.7.0/bin/node
Step 3: Now link this path,
sudo ln -s /home/ec2-user/.nvm/versions/node/v14.7.0/bin/node /usr/bin/node
Step 4: Now try running sudo npm install
it should work without any issues.