Sudo command takes time to run after Sierra A few days back I updated my iMac from El Capitan to Sierra. I have then noticed that the sudo command is not working properly. When I use something like sudo -v or sudo npm install grunt -g it becomes stuck and doesn't ask for the password immediately, as it takes like 20–30 mins and then shows the password prompt.

I am not sure is it because of the Sierra update or something else, but this is really annoying me, as I can't install npm packages and other things.
After lot of reading and all, I found that AMPPS entry in sudoers file is culprit. 

open sudoers file using sudo visudo command OR use some editor (take backup of sudoers file before making changes and also read guide to use "visodo" )

I commented 2 lines in my sudoers file and everything is fine now.  

#%amit ALL= NOPASSWD: /Applications/AMPPS/Ampps.app
#%amit ALL= NOPASSWD: /Applications/AMPPS/ampps


Similar experience/solution has been shared by this blogger here,

You might not be having AMPPS on your machine so what worked for me, might not work for you.

Point to highlight is "There is something in there in your sudoers file which is causing issue, just find that line"