I have the following entry for the scripts key/property in my package.json
"stop": "source .env && yarn doc:stop && lsof -t -i tcp:$EXPRESS_PORT | xargs kill 2> /dev/null && pgrep -f $(pwd) | xargs kill 2> /dev/null",
It does not work when I execute
yarn stop
It throws the following error
/bin/sh: 1: source: not found
But I can call execute directly from the Ubuntu command terminal with no error
source .env
I get the same error when using . (dot) instead of source.
/bin/sh: 1: .: .env: not found
How can I fix?
Thanks