Issue
Jenkins installed in CentOS and installed Node version v14.16.0 also npm version 6.14.11
Failing to execute npm commands like npm install, npm cache clean --force etc via Jenkins job. Showing /usr/bin/env: node: No such file or directory in the job console. Same is working fine when we run the same command in the terminal.
Solution
After executing following it started working
sudo ln -sf "$(which node)" /usr/bin/node
Answered By - Saagar
Answer Checked By - Cary Denson (JavaFixing Admin)