Building the project and serving locally works fine.
When running yarn deploy it throws this error.

Yes, the issue still persists.
yarn --version returns 1.5.0-20180227.1808
Deployment section. Followed all the steps there for Github Pages and still see this error.
Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (4) x64 Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz
Binaries:
Node: 8.11.3 - /usr/local/bin/node
Yarn: 1.5.0-20180227.1808 - ~/.yarn/bin/yarn
npm: 5.6.0 - /usr/local/bin/npm
Browsers:
Chrome: 75.0.3770.142
Firefox: Not Found
Safari: 12.1.2
npmPackages:
react: ^16.8.6 => 16.8.6
react-dom: ^16.8.6 => 16.8.6
react-scripts: Not Found
npmGlobalPackages:
create-react-app: 1.5.1
Deploy runs successfully.
Throws this error.

The link to the project: https://github.com/ekoeditaa/dev-portfolio-template
Thanks in advance!
I also had same problem..
Track in tschaub/gh-pages#310. Seems like it can be fixed by reverting the version of gh-pages down.
Yeah reverting the version works. Thank you @heyimalex !!