I uploaded my laravel project on webhosting heroku but it doesn´t work, it says: Application error An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command heroku logs --tail
When i run the command heroku logs --tail in cmd it shows:
It looks like there are even more errors than one and I don´t really know what that errors mean and I couldn´t find them anywhere.
2023-02-10T20:33:34.785966+00:00 heroku[web.1]: State changed from starting to crashed
2023-02-10T20:34:07.000000+00:00 app[api]: Build succeeded
2023-02-10T20:34:07.404549+00:00 heroku[web.1]: State changed from crashed to starting
2023-02-10T20:34:10.304458+00:00 heroku[web.1]: Starting process with command `npm start`
2023-02-10T20:34:12.223124+00:00 app[web.1]:
2023-02-10T20:34:12.223146+00:00 app[web.1]: > start
2023-02-10T20:34:12.223147+00:00 app[web.1]: > if-env NODE_ENV=production && npm run start:prod || npm run start:dev
2023-02-10T20:34:12.223147+00:00 app[web.1]:
2023-02-10T20:34:12.228492+00:00 app[web.1]: sh: 1: if-env: not found
2023-02-10T20:34:12.626616+00:00 app[web.1]:
2023-02-10T20:34:12.626644+00:00 app[web.1]: > start:dev
2023-02-10T20:34:12.626646+00:00 app[web.1]: > concurrently "nodemon - -ignore 'client/*'" "npm run client"
2023-02-10T20:34:12.626646+00:00 app[web.1]:
2023-02-10T20:34:12.632186+00:00 app[web.1]: sh: 1: concurrently: not found
2023-02-10T20:34:12.794122+00:00 heroku[web.1]: Process exited with status 127
2023-02-10T20:34:12.856093+00:00 heroku[web.1]: State changed from starting to crashed
2023-02-10T20:34:14.498753+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=poradej-turnaj.herokuapp.com request_id=dbc569cd-b37e-4a45-a8cb-8e791fa59c1c fwd="84.42.219.107" dyno= connect= service= status=503 bytes= protocol=https
2023-02-10T20:34:14.675679+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=poradej-turnaj.herokuapp.com request_id=5476f6cb-67c8-4f2e-a5e2-abdbfc923cc2 fwd="84.42.219.107" dyno= connect= service= status=503 bytes= protocol=https
Here I post some of my code: package.json
{
"private": true,
"scripts": {
"start": "if-env NODE_ENV=production && npm run start:prod || npm run start:dev",
"start:prod": "node server.js",
"start:dev": "concurrently \"nodemon - -ignore 'client/*'\" \"npm run client\""
},
"devDependencies": {
"@popperjs/core": "^2.11.6",
"axios": "^0.27",
"bootstrap": "^5.2.3",
"laravel-vite-plugin": "^0.6.0",
"lodash": "^4.17.19",
"postcss": "^8.1.14",
"sass": "^1.56.1",
"vite": "^3.0.0"
},
"engines": {
"npm": "9.4.2",
"node": "18.13.0"
},
"dependencies": {
"nodemon": "^2.0.20"
}
}
Procfile
web: vendor/bin/heroku-php-apache2 public/
Can you please give me any advice? Tell me if I should post any more code