I found the answer:
instead of using the packages config to install node
packages:
yum:
nodejs: []
I used a custom command to install nodejs using yum with a custom config enabling the epel repo
container_commands:
01_install_node:
command: "yum install -y --enablerepo=epel nodejs"
I can confirm that node is now installed on the environment and can run the requirejs optimizer.