Exec node cannot find any of my commands


I'm working on a production machine for toys. The idea is that the toys are on a production line and my "machine" scans them and logs the production info on a database.
My bash script is ready.
The last step for me is to have a visual interface for logistic purposes. For this I am using node-red.

Good. Now my trouble start when I try to execute my bash script using the exec node.
I have tried these solutions:

None of them worked for me.
I ALWAYS get a "command not found" for every command I am making in my script.
prod_test_flash.sh: line 7: esptool.py: command not found

Can you please help and let me know what I am missing? Thanks



This is a Python script for flashing An ESP8266 ROM bootloader utility, what has it to do with a visual interface?



Try specifying the full path to the esptool.py command in your script. It is probably not in the path for the user that is running node-red.



Thanks, that worked! What's the reason? I've seen example where command path was not specified in scripts.
In addition which did not work for esptool.py and I had to use type (reason).



Used to get the MAC of my machine for logistic purposes



It depends on where the command is and what PATH is specified for the user running node-red. If the command is in that users path then it will find it without needing to fully specify it.