I was told to install ngrok via npm globally :
npm install -g ngrok
I was doing this on my macOS Mojave
It failed because of permissions error. Then I did :
sudo npm install -g ngrok
I got errors apparently not related to npm. So it still failed.
npm ERR! Failed at the email@example.com postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I didn't know what to do. Searched everywhere on Google (StackOverflow) etc but still couldn't solve it. So many posts about chown etc.
I then finally did what the documentation said. Download the zip file which just contained a single ngrok executable file.
Ran ./ngrok http 3000 in terminal and all is okay now !
... I mean, wasn't downloading the zip and running the executable the was easiest way ? All this trouble to do only via npm.