I have a React app created with 'create-react-app' and setup for Heroku deployment with " heroku create --buildpack https://github.com/mars/create-react-app-buildpack.git." The initial deployment and the following ones via Travis CI were successful. However, since yesterday, while the app is still being deployed after successful build, it can not be opened and the Heroku log reads:
2018-10-09T20:14:16.000000+00:00 app[api]: Build succeeded
2018-10-09T20:14:19.093204+00:00 heroku[web.1]: Starting process with commandbin/boot
2018-10-09T20:14:21.599174+00:00 app[web.1]: Injecting runtime env into /app/build/static/js/1.65a45b50.chunk.js (from .profile.d/inject_react_app_env.sh)
2018-10-09T20:14:22.010832+00:00 app[web.1]: Injecting runtime env into /app/build/static/js/main.b9301262.chunk.js (from .profile.d/inject_react_app_env.sh)
2018-10-09T20:14:22.212043+00:00 app[web.1]: Injecting runtime env into /app/build/static/js/runtime~main.229c360f.js (from .profile.d/inject_react_app_env.sh)
2018-10-09T20:14:22.748085+00:00 app[web.1]: Starting log redirection...
2018-10-09T20:14:22.748475+00:00 app[web.1]: Starting nginx...
2018-10-09T20:14:22.846806+00:00 app[web.1]: Process exited unexpectedly: nginx
2018-10-09T20:14:22.847047+00:00 app[web.1]: Going down, terminating child processes...
2018-10-09T20:14:22.845551+00:00 app[web.1]: nginx: [emerg] invalid number of arguments in "set" directive in ./config/nginx.conf:76
2018-10-09T20:14:22.949293+00:00 heroku[web.1]: State changed from starting to crashed
2018-10-09T20:14:22.950957+00:00 heroku[web.1]: State changed from crashed to starting
2018-10-09T20:14:22.935763+00:00 heroku[web.1]: Process exited with status 1
I can't see what the "set" directive refers to and how I am supposed to configure it. From my understanding the way to configure the Nginx server's behavior would be via the static.json file (https://github.com/heroku/heroku-buildpack-static#configuration) but I might be wrong. So far it is configured this way:
{
"root": "build/",
"routes": {
"/**": "index.html"
},
"proxies": {
"/api/": {
"origin": "${PORT}"
}
}
}
I also added an app.json as indicated here https://github.com/mars/create-react-app-buildpack#user-content-commit--deploy-%EF%B8%8F :
{
"buildpacks": [
{
"url": "mars/create-react-app"
}
]
}
The buildpack I am using configures the dyno this way so I shouldn't need a Procfile
I have done lots of research but can't find anything that could solve this issue. Any help is much appreciated! Thank you!