Reinstall Node.js and npm from NodeSource Repository fixed my problem. The simplest way to install Node.js and npm is from the NodeSource repository, which provides up-to-date versions tailored for your system. This method ensures you get the latest features, performance improvements, and security patches for Node.js and npm.
To accomplish that, take the following steps:
sudo yum update
curl -sL https://rpm.nodesource.com/setup_16.x | sudo bash -
sudo yum install -y nodejs 4. Verify the installed software with these commands:
node --version