'Install Node Red LG TV control in Home Assistant OS

I'm a newbie hoping to control my LG TV with Node-Red in Home Assistant OS running on a Raspberry Pi 4.

I've tried to install "node-red-contrib-lgtv" from within "manage pallete" of Node red but I get the following errors;

2022-02-12T07:16:31.961Z Install : node-red-contrib-lgtv 1.1.0

2022-02-12T07:16:34.043Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict [email protected]
2022-02-12T07:16:42.828Z [err] npm
2022-02-12T07:16:42.828Z [err]  
2022-02-12T07:16:42.828Z [err] ERR! code
2022-02-12T07:16:42.829Z [err]  126
2022-02-12T07:16:42.829Z [err] npm ERR!
2022-02-12T07:16:42.830Z [err]  path /config/node-red/node_modules/utf-8-validate
2022-02-12T07:16:42.836Z [err] npm ERR! command failed
2022-02-12T07:16:42.836Z [err] npm ERR! command
2022-02-12T07:16:42.837Z [err]  sh -c node-gyp-build
2022-02-12T07:16:42.837Z [err] npm ERR! sh: node-gyp-build: Permission denied
2022-02-12T07:16:42.884Z [err] 
2022-02-12T07:16:42.884Z [err] npm
2022-02-12T07:16:42.885Z [err]  ERR! A complete log of this run can be found in:
2022-02-12T07:16:42.885Z [err] npm ERR!     /root/.npm/_logs/2022-02-12T07_16_42_840Z-debug.log
2022-02-12T07:16:42.908Z rc=126

I suspect it's a dependency problem but unfortunately, the link to "dependencies status" on the main page is not working.

Any idea what these errors mean and how I can install this correctly?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source