I created an rpm package that extract a Node.js project into a specific folder and then I created a postinstall script that cd into that folder and perform an npm install --production#!/bin/bashcd /opt/projectnpm install --productionThe problem is that after rpm unpacks the project I receive the fallowing error:/var/tmp/rpm-tmp.MbfpY5: line 3: npm: command not foundwarning: %post(pack-0.0.0-1.noarch) scriptlet failed, exit status 127Of course npm is installed and, if I execute the same script manually, it works. I read that the exit status 127 is also related to a bug in selinux policies, but I tried to disable selinux completely and received the same error.I also have the exact same code as a .deb and its working flawless there, but I can't make it work in CentOS. Any idea where the problem might be?Thank you
Bash script problem in RPM postinstall
centos;rpm;node.js;npm