Any and all help will be much appreciated.
I've been trying to deploy to Heroku with all day. I'm using Vite locally to develop, so I figured I'd try to deploy with that too. Everything works locally (of course) and the build is successful when I deploy the repository. However, when I try to view my app, I get the following:
2021-10-05T02:12:13.493958+00:00 heroku[web.1]: Starting process with command `npm start`
2021-10-05T02:12:14.624236+00:00 app[web.1]: [heroku-exec] Starting
2021-10-05T02:12:14.834583+00:00 app[web.1]:
2021-10-05T02:12:14.834585+00:00 app[web.1]: > [email protected] start /app
2021-10-05T02:12:14.834585+00:00 app[web.1]: > vite
2021-10-05T02:12:14.834585+00:00 app[web.1]:
2021-10-05T02:12:15.759365+00:00 app[web.1]: Pre-bundling dependencies:
2021-10-05T02:12:15.759384+00:00 app[web.1]: vue
2021-10-05T02:12:15.759384+00:00 app[web.1]: vue-chart-3
2021-10-05T02:12:15.759385+00:00 app[web.1]: axios
2021-10-05T02:12:15.759389+00:00 app[web.1]: (this will be run only when your dependencies or config have changed)
2021-10-05T02:12:16.402419+00:00 app[web.1]:
2021-10-05T02:12:16.402429+00:00 app[web.1]: vite v2.5.5 dev server running at:
2021-10-05T02:12:16.402429+00:00 app[web.1]:
2021-10-05T02:12:16.402543+00:00 app[web.1]: > Local: http://localhost:3000/
2021-10-05T02:12:16.402578+00:00 app[web.1]: > Network: use `--host` to expose
2021-10-05T02:12:16.402610+00:00 app[web.1]:
2021-10-05T02:12:16.402611+00:00 app[web.1]: ready in 1529ms.
2021-10-05T02:12:16.402611+00:00 app[web.1]:
2021-10-05T02:12:16.000000+00:00 app[api]: Build succeeded
2021-10-05T02:13:14.120863+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2021-10-05T02:13:14.233876+00:00 heroku[web.1]: Stopping process with SIGKILL
2021-10-05T02:13:14.376928+00:00 heroku[web.1]: Process exited with status 137
2021-10-05T02:13:14.423585+00:00 heroku[web.1]: State changed from starting to crashed
2021-10-05T02:13:15.030060+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=indicatorsdashboardfrontend.herokuapp.com request_id=c9ad1cae-2b32-4e54-bab1-7919401af71c fwd="98.209.145.237" dyno= connect= service= status=503 bytes= protocol=https
I read a post here that said that I needed to set some variables so that Vite would install properly and I believe I did that:
NPM_CONFIG_PRODUCTION=false
NPM_CONFIG_LOGLEVEL=error
YARN_PRODUCTION=false
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
My repository can be found here: https://github.com/kddove85/IndicatorDashboardFrontend
I think the important file is the package.json but I'm not sure. Here that is:
{
"name": "dashboard-frontend",
"version": "0.0.0",
"scripts": {
"start": "vite",
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
},
"dependencies": {
"@vue/cli": "^4.5.13",
"axios": "^0.21.4",
"chart.js": "^2.9.4",
"lodash": "^4.17.21",
"vue": "^3.2.6",
"vue-axios": "^3.3.6",
"vue-chart-3": "^0.5.8"
},
"devDependencies": {
"@vitejs/plugin-vue": "^1.6.1",
"@vue/compiler-sfc": "^3.2.6",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^7.18.0",
"vite": "^2.5.4"
},
"engines": {
"node": "14.17.5",
"npm": "6.14.14"
}
}
I'm just not sure what I did wrong.
PORT
value which you should not as heroku dynamically assigns a PORT value on build. β AmΒlie