Assignment Statements, Comparisons & Observations
Font: Size: + -

Why do most tutorials tell you to install some package or tool globally via npm ?

Tuesday, November 24, 2020

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 ngrok@3.3.0 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.


Packers Movers Jaipur said...

Get Packers and Movers Jaipur List of Top Reliable, 100% Affordable, Verified and Secured Service Provider. Get Free ###Packers and Movers Jaipur Price Quotation instantly and Save Cost and Time. Packers and Movers Jaipur ✔✔✔Reviews and Compare Charges for household Shifting, Home/Office Relocation, ***Car Transportation, Pet Relocation, Bike SHifting @ Packers And Movers Jaipur