NPM error “node: error while loading shared libraries: libbrotlidec.so.1”

Today when trying to deploy a Laravel app we ran into the error message

node: error while loading shared libraries: libbrotlidec.so.1: cannot open shared object file: No such file or directory

It appeared as though NPM was now failing as the same error occurred when issuing the command

npm -v

Solution:
There is a quick solution to the issue with NPM that would generate the error node: error while loading shared libraries: libbrotlidec.so.1: cannot open shared object file: No such file or directory

issue the following command as root

yum install brotli

Try again and you should now be good to go with whatever NPM command you had the issue with.

Rating: 5.00/5. From 1 vote.
Please wait...

1 thought on “NPM error “node: error while loading shared libraries: libbrotlidec.so.1””

  1. Great piece of information.

    Rating: 5.00/5. From 1 vote.
    Please wait...

Leave a Comment

Your email address will not be published. Required fields are marked *