jenkins command not found

  ● Executing the ng build command under Jenkins will prompt "command not found", but there is no problem in executing native commands such as ls. On the Linux host, the environment variables are configured by modifying the /etc/profile file. The problem may be that Jenkins does not load the /etc/profile file when executing the shell script, so the ng command cannot be found, and it will prompt "command not found".

  ● Jenkins executes shell scripts in non-login mode by default. However, the non-login mode will not load the /etc/profile file. Add commands such as #!/bin/sh -l to the Execute shell and modify it to login mode to solve the problem. .


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324930816&siteId=291194637