Heroku application error H10

**I’m getting the following error when I’m trying to deploy my app on heroku **

2020-09-19T11:38:00.282345+00:00 heroku[router]: at=error code=H10 desc=“App crashed” method=GET path="/" host=lohiya-weather-forecast-app.herokuapp.com request_id=5c97ea7a-00da-4f3f-9bae-b278ed232bc6 fwd=“157.33.181.131” dyno= connect= service= status=503 bytes= protocol=https
2020-09-19T11:38:01.498628+00:00 heroku[router]: at=error code=H10 desc=“App crashed” method=GET path="/favicon.ico" host=lohiya-weather-forecast-app.herokuapp.com request_id=24c5de93-a7de-457f-aeaa-a03ca0242251 fwd=“157.33.181.131” dyno= connect= service= status=503 bytes= protocol=https
2020-09-19T11:38:56.650542+00:00 heroku[web.1]: State changed from crashed to starting
2020-09-19T11:38:58.620365+00:00 heroku[web.1]: Starting process with command npm start
2020-09-19T11:39:00.973670+00:00 app[web.1]:
2020-09-19T11:39:00.973684+00:00 app[web.1]: > web-servers@1.0.0 start /app
2020-09-19T11:39:00.973685+00:00 app[web.1]: > node src/app.js
2020-09-19T11:39:00.973685+00:00 app[web.1]:
2020-09-19T11:39:01.167830+00:00 app[web.1]: internal/modules/cjs/loader.js:968
2020-09-19T11:39:01.167831+00:00 app[web.1]: throw err;
2020-09-19T11:39:01.167831+00:00 app[web.1]: ^
2020-09-19T11:39:01.167831+00:00 app[web.1]:
2020-09-19T11:39:01.167832+00:00 app[web.1]: Error: Cannot find module ‘postman-request’
2020-09-19T11:39:01.167832+00:00 app[web.1]: Require stack:
2020-09-19T11:39:01.167832+00:00 app[web.1]: - /app/src/utils/geoCode.js
2020-09-19T11:39:01.167833+00:00 app[web.1]: - /app/src/app.js
2020-09-19T11:39:01.167833+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
2020-09-19T11:39:01.167833+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:841:27)
2020-09-19T11:39:01.167834+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:1025:19)
2020-09-19T11:39:01.167834+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:72:18)
2020-09-19T11:39:01.167834+00:00 app[web.1]: at Object. (/app/src/utils/geoCode.js:1:24)
2020-09-19T11:39:01.167835+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1137:30)
2020-09-19T11:39:01.167835+00:00 app[web.1]: at Object.Module._extensions…js (internal/modules/cjs/loader.js:1157:10)
2020-09-19T11:39:01.167835+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:985:32)
2020-09-19T11:39:01.167835+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:878:14)
2020-09-19T11:39:01.167836+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:1025:19) {
2020-09-19T11:39:01.167836+00:00 app[web.1]: code: ‘MODULE_NOT_FOUND’,
2020-09-19T11:39:01.167836+00:00 app[web.1]: requireStack: [ ‘/app/src/utils/geoCode.js’, ‘/app/src/app.js’ ]
2020-09-19T11:39:01.167836+00:00 app[web.1]: }
2020-09-19T11:39:01.175874+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-09-19T11:39:01.176093+00:00 app[web.1]: npm ERR! errno 1
2020-09-19T11:39:01.178514+00:00 app[web.1]: npm ERR! web-servers@1.0.0 start: node src/app.js
2020-09-19T11:39:01.178621+00:00 app[web.1]: npm ERR! Exit status 1
2020-09-19T11:39:01.178734+00:00 app[web.1]: npm ERR!
2020-09-19T11:39:01.178840+00:00 app[web.1]: npm ERR! Failed at the web-servers@1.0.0 start script.
2020-09-19T11:39:01.178926+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-09-19T11:39:01.187102+00:00 app[web.1]:
2020-09-19T11:39:01.187311+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-09-19T11:39:01.187428+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-09-19T11_39_01_180Z-debug.log
2020-09-19T11:39:01.247605+00:00 heroku[web.1]: Process exited with status 1
2020-09-19T11:39:01.285951+00:00 heroku[web.1]: State changed from starting to crashed
2020-09-19T11:41:26.762386+00:00 heroku[web.1]: State changed from crashed to starting
2020-09-19T11:41:28.986518+00:00 heroku[web.1]: Starting process with command npm start
2020-09-19T11:41:31.612827+00:00 app[web.1]:
2020-09-19T11:41:31.620610+00:00 app[web.1]: > web-servers@1.0.0 start /app
2020-09-19T11:41:31.620611+00:00 app[web.1]: > node src/app.js
2020-09-19T11:41:31.620615+00:00 app[web.1]:
2020-09-19T11:41:31.912108+00:00 app[web.1]: internal/modules/cjs/loader.js:968
2020-09-19T11:41:31.912292+00:00 app[web.1]: throw err;
2020-09-19T11:41:31.912293+00:00 app[web.1]: ^
2020-09-19T11:41:31.912293+00:00 app[web.1]:
2020-09-19T11:41:31.912298+00:00 app[web.1]: Error: Cannot find module ‘postman-request’
2020-09-19T11:41:31.912299+00:00 app[web.1]: Require stack:
2020-09-19T11:41:31.912303+00:00 app[web.1]: - /app/src/utils/geoCode.js
2020-09-19T11:41:31.912304+00:00 app[web.1]: - /app/src/app.js
2020-09-19T11:41:31.912308+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
2020-09-19T11:41:31.912309+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:841:27)
2020-09-19T11:41:31.912316+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:1025:19)
2020-09-19T11:41:31.912317+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:72:18)
2020-09-19T11:41:31.912317+00:00 app[web.1]: at Object. (/app/src/utils/geoCode.js:1:24)
2020-09-19T11:41:31.912318+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1137:30)
2020-09-19T11:41:31.912318+00:00 app[web.1]: at Object.Module._extensions…js (internal/modules/cjs/loader.js:1157:10)
2020-09-19T11:41:31.912318+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:985:32)
2020-09-19T11:41:31.912319+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:878:14)
2020-09-19T11:41:31.912319+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:1025:19) {
2020-09-19T11:41:31.912319+00:00 app[web.1]: code: ‘MODULE_NOT_FOUND’,
2020-09-19T11:41:31.912320+00:00 app[web.1]: requireStack: [ ‘/app/src/utils/geoCode.js’, ‘/app/src/app.js’ ]
2020-09-19T11:41:31.912320+00:00 app[web.1]: }
2020-09-19T11:41:31.923896+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-09-19T11:41:31.923898+00:00 app[web.1]: npm ERR! errno 1
2020-09-19T11:41:31.926937+00:00 app[web.1]: npm ERR! web-servers@1.0.0 start: node src/app.js
2020-09-19T11:41:31.926938+00:00 app[web.1]: npm ERR! Exit status 1
2020-09-19T11:41:31.926939+00:00 app[web.1]: npm ERR!
2020-09-19T11:41:31.926940+00:00 app[web.1]: npm ERR! Failed at the web-servers@1.0.0 start script.
2020-09-19T11:41:31.926941+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-09-19T11:41:31.939430+00:00 app[web.1]:
2020-09-19T11:41:31.939438+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-09-19T11:41:31.939439+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-09-19T11_41_31_927Z-debug.log
2020-09-19T11:41:32.051944+00:00 heroku[web.1]: Process exited with status 1
2020-09-19T11:41:32.086802+00:00 heroku[web.1]: State changed from starting to crashed

Hello there,

It seems like this is telling us exactly what the error is…

I assume you used this package for testing in development, and did not uninstall/remove it properly?

But, It’s working fine on the localhost
And I haven’t removed it
Here’s content from my package.json file
{
“name”: “web-servers”,
“version”: “1.0.0”,
“main”: “app.js”,
“scripts”: {
“start”: “node src/app.js”
},
“keywords”: ,
“author”: “”,
“license”: “ISC”,
“dependencies”: {
“express”: “^4.17.1”,
“hbs”: “^4.1.1”,
“postman-request”: “^2.88.1-postman.25”
},
“description”: “”
}

It still might be worth running npm ci to ensure the package-lock.json is correct.

If that does not work, could you post a link to your code. I assume you have it on GitHub? If not, then share some of the relevant code mentioned in the errors.

1 Like

I tried the npm ci command but I don’t know what it really does?
Besides, you found the error?

npm ci installs all of the modules/packages mentioned in the package.json file.

Unfortunately, I cannot find the error. I tested your app (no changes) in GitPod, and it works just as expected:

I like the design, by the way.

1 Like

This looks like a syntax error… Is this correct?

Yes, the naming of their package versions is just odd.

2 Likes

actually it’s working right now…don’t know what happened
You can check it