Finally after almost two weeks of trying I found the problem. This is caused by Apple’s change of default shell scripting language from bash to zsh. Follow this instruction / to set it back to bash, your build will succeed.
Hope this will help someone. Happy coding!
2 Likes