Home Uncategorized Updating npm error fix
Uncategorized

Updating npm error fix

Installing a new program via Terminal or updating versions of npm often comes with errors that appear for no apparent reason. In most cases, the issue is in permissions, or lack of them, to be precise.

We can usually solve this by appending the sudo command. Sudo, an acronym for superuser do, is a command that allows you to run programs with the security privileges of a superuser.

So, if we are talking about updating npm, instead of writing:

npm install -g npm@...

We would write:

sudo npm install -g npm@...

We can test if everything went well by checking the npm version:

npm -v
Written by
Igor Bujas

I am a UI designer and front-end developer professional working mostly in the Shopify ecosystem. I've been working in the industry for so long that I was fixing bugs for IE5, and animating in Flash while it was still a Macromedia product. While not differentiating between the UI and the code, I am always looking to get outdoors for some alpine climbs or scuba dives. I also work as a Krav Maga instructor in Zagreb, Croatia.

Leave a comment

Related Articles

AIUncategorized

How to use chatGPT in Visual Studio Code

ChatGPT is everywhere these days; it is the talk of the year...

4 proven ways to speed up your Shopify store.

    We respect your privacy. Unsubscribe at anytime.