vendredi 26 juillet 2019

Heroku and Node.js appliation deployment error H10 (App crashed)

I have a Node.js app working on my local computer, but when I send it to heroku, it crashes. The error log gives an error fs-extra and h10 error & says:

2019-07-26T17:16:14.848135+00:00 app[web.1]: npm ERR! photo_gallery@1.0.0 start: `node src/index.js`
2019-07-26T17:16:14.848296+00:00 app[web.1]: npm ERR! Exit status 1
2019-07-26T17:16:14.848589+00:00 app[web.1]: npm ERR!
2019-07-26T17:16:14.848773+00:00 app[web.1]: npm ERR! Failed at the photo_gallery@1.0.0 start script.
2019-07-26T17:16:14.848934+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-07-26T17:16:14.856759+00:00 app[web.1]:
2019-07-26T17:16:14.856969+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-07-26T17:16:14.857112+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2019-07-26T17_16_14_850Z-debug.log
2019-07-26T17:16:14.922237+00:00 heroku[web.1]: State changed from starting to crashed
2019-07-26T17:16:14.903296+00:00 heroku[web.1]: Process exited with status 1
2019-07-26T17:21:58.000000+00:00 app[api]: Build started by user pablo.fonsecam@outlook.com
2019-07-26T17:22:18.332228+00:00 app[api]: Release v14 created by user pablo.fonsecam@outlook.com
2019-07-26T17:22:19.059821+00:00 heroku[web.1]: State changed from crashed to starting
2019-07-26T17:22:18.332228+00:00 app[api]: Deploy e3de16e4 by user pablo.fonsecam@outlook.com
2019-07-26T17:22:19.000000+00:00 app[api]: Build succeeded
2019-07-26T17:22:21.373433+00:00 heroku[web.1]: Starting process with command `npm start`
2019-07-26T17:22:23.240662+00:00 app[web.1]:
2019-07-26T17:22:23.240691+00:00 app[web.1]: > photo_gallery@1.0.0 start /app
2019-07-26T17:22:23.240694+00:00 app[web.1]: > node src/index.js
2019-07-26T17:22:23.240695+00:00 app[web.1]: 
2019-07-26T17:22:23.906975+00:00 app[web.1]: mongodb+srv://pablofonseca:mongoDeveloper3294MD@cluster0-6auoq.mongodb.net/test?retryWrites=true&w=majority
2019-07-26T17:22:23.907008+00:00 app[web.1]: PORT = 4000
2019-07-26T17:22:24.054794+00:00 app[web.1]: internal/modules/cjs/loader.js:638
2019-07-26T17:22:24.054797+00:00 app[web.1]: throw err;
2019-07-26T17:22:24.054799+00:00 app[web.1]: ^
2019-07-26T17:22:24.054804+00:00 app[web.1]:
2019-07-26T17:22:24.054805+00:00 app[web.1]: Error: Cannot find module 'fs-extra'
2019-07-26T17:22:24.054808+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
2019-07-26T17:22:24.054810+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:562:25)
2019-07-26T17:22:24.054811+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:690:17)
2019-07-26T17:22:24.054813+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:25:18)
2019-07-26T17:22:24.054815+00:00 app[web.1]: at Object.<anonymous> (/app/src/routes/index.js:13:12)
2019-07-26T17:22:24.054816+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:776:30)
2019-07-26T17:22:24.054818+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
2019-07-26T17:22:24.054819+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:653:32)
2019-07-26T17:22:24.054821+00:00 app[web.1]: at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
2019-07-26T17:22:24.054822+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:585:3)
2019-07-26T17:22:24.054824+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:690:17)
2019-07-26T17:22:24.054825+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:25:18)
2019-07-26T17:22:24.054827+00:00 app[web.1]: at Object.<anonymous> (/app/src/app.js:45:9)
2019-07-26T17:22:24.054828+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:776:30)
2019-07-26T17:22:24.054830+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
2019-07-26T17:22:24.054831+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:653:32)
2019-07-26T17:22:24.067067+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-07-26T17:22:24.067718+00:00 app[web.1]: npm ERR! errno 1
2019-07-26T17:22:24.069075+00:00 app[web.1]: npm ERR! photo_gallery@1.0.0 start: `node src/index.js`
2019-07-26T17:22:24.069317+00:00 app[web.1]: npm ERR! Exit status 1
2019-07-26T17:22:24.069566+00:00 app[web.1]: npm ERR!
2019-07-26T17:22:24.069800+00:00 app[web.1]: npm ERR! Failed at the photo_gallery@1.0.0 start script.
2019-07-26T17:22:24.069923+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-07-26T17:22:24.077928+00:00 app[web.1]: 
2019-07-26T17:22:24.078213+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-07-26T17:22:24.078423+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2019-07-26T17_22_24_071Z-debug.log
2019-07-26T17:22:24.159588+00:00 heroku[web.1]: State changed from starting to crashed
2019-07-26T17:22:24.144163+00:00 heroku[web.1]: Process exited with status 1
2019-07-26T17:22:49.060962+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=crgrupodediseno.herokuapp.com request_id=37e666bc-127d-4ab0-99b8-53b3f206169c fwd="201.192.136.17" dyno= connect= service= status=503 bytes= protocol=https
2019-07-26T17:22:49.234652+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=crgrupodediseno.herokuapp.com request_id=e475283a-8bb7-44d2-abf7-9b227ad0e23d fwd="201.192.136.17" dyno= connect= service= status=503 bytes= protocol=https       
2019-07-26T17:27:56.986168+00:00 heroku[web.1]: State changed from crashed to starting
2019-07-26T17:27:59.519229+00:00 heroku[web.1]: Starting process with command `npm start`
2019-07-26T17:28:01.823168+00:00 app[web.1]: 
2019-07-26T17:28:01.823191+00:00 app[web.1]: > photo_gallery@1.0.0 start /app
2019-07-26T17:28:01.823193+00:00 app[web.1]: > node src/index.js
2019-07-26T17:28:01.823195+00:00 app[web.1]:
2019-07-26T17:28:02.673345+00:00 app[web.1]: mongodb+srv://pablofonseca:mongoDeveloper3294MD@cluster0-6auoq.mongodb.net/test?retryWrites=true&w=majority
2019-07-26T17:28:02.673368+00:00 app[web.1]: PORT = 4000
2019-07-26T17:28:02.835957+00:00 app[web.1]: internal/modules/cjs/loader.js:638
2019-07-26T17:28:02.835962+00:00 app[web.1]: throw err;
2019-07-26T17:28:02.835964+00:00 app[web.1]: ^
2019-07-26T17:28:02.835966+00:00 app[web.1]:
2019-07-26T17:28:02.835971+00:00 app[web.1]: Error: Cannot find module 'fs-extra'
2019-07-26T17:28:02.835974+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
2019-07-26T17:28:02.835976+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:562:25)
2019-07-26T17:28:02.835978+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:690:17)
2019-07-26T17:28:02.835980+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:25:18)
2019-07-26T17:28:02.835983+00:00 app[web.1]: at Object.<anonymous> (/app/src/routes/index.js:13:12)
2019-07-26T17:28:02.835984+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:776:30)
2019-07-26T17:28:02.835987+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
2019-07-26T17:28:02.835989+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:653:32)
2019-07-26T17:28:02.835991+00:00 app[web.1]: at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
2019-07-26T17:28:02.835993+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:585:3)
2019-07-26T17:28:02.835994+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:690:17)
2019-07-26T17:28:02.835996+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:25:18)
2019-07-26T17:28:02.835998+00:00 app[web.1]: at Object.<anonymous> (/app/src/app.js:45:9)
2019-07-26T17:28:02.835999+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:776:30)
2019-07-26T17:28:02.836001+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
2019-07-26T17:28:02.836002+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:653:32)
2019-07-26T17:28:02.848608+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-07-26T17:28:02.849257+00:00 app[web.1]: npm ERR! errno 1
2019-07-26T17:28:02.850734+00:00 app[web.1]: npm ERR! photo_gallery@1.0.0 start: `node src/index.js`
2019-07-26T17:28:02.850910+00:00 app[web.1]: npm ERR! Exit status 1
2019-07-26T17:28:02.851181+00:00 app[web.1]: npm ERR!
2019-07-26T17:28:02.851359+00:00 app[web.1]: npm ERR! Failed at the photo_gallery@1.0.0 start script.
2019-07-26T17:28:02.851539+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-07-26T17:28:02.859881+00:00 app[web.1]:
2019-07-26T17:28:02.860158+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-07-26T17:28:02.860288+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2019-07-26T17_28_02_853Z-debug.log
2019-07-26T17:28:02.928413+00:00 heroku[web.1]: State changed from starting to crashed
2019-07-26T17:28:02.909431+00:00 heroku[web.1]: Process exited with status 1

Has anyone had this before, and know what might be causing the problem? I cannot find a solution.

Actually I have fs-extra module installed in my computer, and the application is running correctly in local, but in Heroku is not working. Thanks.




Aucun commentaire:

Enregistrer un commentaire