Hey guys I’m trying to put my server on heroku, but I can’t because of this error.
at=error code=H10 desc=“App crashed” method=GET path="/"
Here are my logs
2020-03-29T05:04:34.000000+00:00 app[api]: Build started by user getuil@outlook.com
2020-03-29T05:04:45.526927+00:00 app[api]: Deploy 321c2f93 by user getuil@outlook.com
2020-03-29T05:04:45.526927+00:00 app[api]: Release v18 created by user getuil@outlook.com
2020-03-29T05:04:45.964943+00:00 heroku[web.1]: State changed from crashed to starting
2020-03-29T05:04:45.000000+00:00 app[api]: Build succeeded
2020-03-29T05:04:47.667325+00:00 heroku[web.1]: Starting process with command `npm start`
2020-03-29T05:04:51.034377+00:00 heroku[web.1]: State changed from starting to crashed
2020-03-29T05:04:50.879077+00:00 app[web.1]:
2020-03-29T05:04:50.879094+00:00 app[web.1]: > test@1.0.0 start /app
2020-03-29T05:04:50.879094+00:00 app[web.1]: > node server.js
2020-03-29T05:04:50.879095+00:00 app[web.1]:
2020-03-29T05:04:50.951425+00:00 app[web.1]: internal/modules/cjs/loader.js:985
2020-03-29T05:04:50.951427+00:00 app[web.1]: throw err;
2020-03-29T05:04:50.951428+00:00 app[web.1]: ^
2020-03-29T05:04:50.951428+00:00 app[web.1]:
2020-03-29T05:04:50.951428+00:00 app[web.1]: Error: Cannot find module 'express'
2020-03-29T05:04:50.951429+00:00 app[web.1]: Require stack:
2020-03-29T05:04:50.951432+00:00 app[web.1]: - /app/server.js
2020-03-29T05:04:50.951433+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
2020-03-29T05:04:50.951433+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:864:27)
2020-03-29T05:04:50.951434+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:1044:19)
2020-03-29T05:04:50.951434+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:77:18)
2020-03-29T05:04:50.951435+00:00 app[web.1]: at Object.<anonymous> (/app/server.js:2:17)
2020-03-29T05:04:50.951435+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1158:30)
2020-03-29T05:04:50.951436+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
2020-03-29T05:04:50.951436+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:1002:32)
2020-03-29T05:04:50.951437+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:901:14)
2020-03-29T05:04:50.951437+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) {
2020-03-29T05:04:50.951438+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
2020-03-29T05:04:50.951438+00:00 app[web.1]: requireStack: [ '/app/server.js' ]
2020-03-29T05:04:50.951438+00:00 app[web.1]: }
2020-03-29T05:04:50.951439+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-03-29T05:04:50.951439+00:00 app[web.1]: npm ERR! errno 1
2020-03-29T05:04:50.951439+00:00 app[web.1]: npm ERR! test@1.0.0 start: `node server.js`
2020-03-29T05:04:50.951440+00:00 app[web.1]: npm ERR! Exit status 1
2020-03-29T05:04:50.951440+00:00 app[web.1]: npm ERR!
2020-03-29T05:04:50.951440+00:00 app[web.1]: npm ERR! Failed at the test@1.0.0 start script.
2020-03-29T05:04:50.951441+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-03-29T05:04:50.953651+00:00 app[web.1]: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
2020-03-29T05:04:50.954263+00:00 app[web.1]:
2020-03-29T05:04:50.954463+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-03-29T05:04:50.954597+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-03-29T05_04_50_949Z-debug.log
2020-03-29T05:04:51.019619+00:00 heroku[web.1]: Process exited with status 1
2020-03-29T05:05:22.585069+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=imc-calculator.herokuapp.com request_id=dd605fc8-33af-42be-849b-ccd5ca1e65bf fwd="45.226.140.11" dyno= connect= service= status=503 bytes= protocol=https
2020-03-29T05:05:23.274366+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=imc-calculator.herokuapp.com request_id=389ec9d1-ec8d-4b22-afdd-77d81da1e4a7 fwd="45.226.140.11" dyno= connect= service= status=503 bytes= protocol=https
And Here my package.json
{
"name":"test",
"version":"1.0.0",
"main":"server.js",
"scripts":{
"start":"node server.js"
},
"author":"FlorSousa",
"license":"MIT",
"dependecies":{
"express":"^4.16.2"
}
}