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.

Leave a Comment

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