Flutter builds from remote Jenkins using Agents/nodes

Hi Everyone,

I am using Jenkins 2.440.2 on Ubuntu server, Need to remotely build flutter apps/android/iOS. Flutter is installed on the local Mac computer, I created node and it sees this Mac computer. But when I try to run the job it is not working and shows following error:
$ /bin/sh -xe /var/folders/gt/2qgwvf594w90hj85sxrjyqxr0000gq/T/jenkins14616729415589806688.sh

  • ‘!/bin/’
    /var/folders/gt/2qgwvf594w90hj85sxrjyqxr0000gq/T/jenkins14616729415589806688.sh: line 2: !/bin/: No such file or directory
    Build step ‘Execute shell’ marked build as failure
    Finished: FAILURE

Are you executing an sh step in a pipeline of freestyle project?
If yes can you post the corresponding content of that step, e.g. pipeline snippet or just the sh step content

Thanks for your prompt reply.
I am executing it inside Build Steps> Execute shell. I provided a screenshot below, not sure if the command is working or it needs a proper script.

hmm that would mean it is probably in the flutter command. Is this a script?
If yes what is there in this script at the beginning?