This is a Next.js project to demonstrate bug 22815

npm i
# or
yarn

then

npm run build
# or
yarn build

You should the issue right away. The build is trying to run getInitialProps during build time