I saw this question precisely because I hit the same issue with a new Amazon Linux 2 server.
Two options; either wait for the official release of the AWS Linux 2022 AMI build (which has the correct version of libuv baked in). It's still in Preview at the moment, however. https://aws.amazon.com/linux/amazon-linux-2022/?amazon-linux-whats-new.sort-by=item.additionalFields.postDateTime&amazon-linux-whats-new.sort-order=desc
A more instant gratification can be gained by installing libuv manually. These instructions were gained from the README file inside the tar.gz. Note that this is specific to version 1.43, but if you require a different version, visiting https://dist.libuv.org/dist/ will show all possible versions.
wget https://dist.libuv.org/dist/v1.43.0/libuv-v1.43.0.tar.gz tar -zxf libuv-v1.43.0.tar.gz cd libuv-v1.43.0/ ./autogen.sh ./configure make make install
and then try your yum install of nodejs again;
yum install -y nodejs
NodeJs installation fails for new environment Rails 6asked a year ago
Linux 2 yum install nodejs fails dependency resolution for libuv >= 1:1.42.0asked 8 months ago
yum fails on ecs amiasked 3 years ago
How do you install dnf on Amazon Linux 2?asked 3 years ago
yum makecache fails in prebuild in Elastic Beanstalkasked 3 months ago
EC2, PHP7.4, php-zipasked 3 years ago
Is there antivirus software recommended to install AWS Linux 2 system?asked 4 months ago
Is there a way to install R libraries in SageMaker that receive a non-zero exit status?Accepted Answerasked 4 years ago
install package - dependency conflictAccepted Answerasked 3 years ago
Installing Yarn on Amazon Linux 2 Instance with yum in prebuild hookasked a year ago