Reputation: 5819
I'm setting up an automator run shell script to go to a specific folder on users machines and then yarn run dev but when it gets to the yarn part it can't find yarn.
-line 1: yarn: command not found
If I use terminal then yarn will run fine. I have yarn installed -g which is in my NVM modules.
Here is my script in automator.
cd ~/Documents/myProject
yarn run dev
Upvotes: 0
Views: 1226
Reputation: 207758
Like this:
export PATH=$PATH:/Users/me/.nvm/versions/node/v10.16.3/bin
cd ~/Documents/myProject
yarn run dev
The first line tells bash
where to look for programs, such as yarn
and node
.
Upvotes: 1