DemocracyOS / democracyos

Democracia en Red is focusing on specific implementations of DemocracyOS. We are working now working with governments and activists all over Latin America. If you are interested in our online participation tools you can check them out on our site.
https://democraciaos.org/en/
GNU General Public License v3.0
1.77k stars 616 forks source link

heroku deploy failing #1636

Open niranjan92 opened 6 years ago

niranjan92 commented 6 years ago

heroku one-click deploy fails with logs. any ideas what might be wrong?

screen shot 2018-08-14 at 10 46 07 pm

LOGS:

2018-08-14T17:09:07.756834+00:00 heroku[web.1]: Starting process with command `NODE_PATH=. PUBLIC_PORT=80 node index.js`
2018-08-14T17:09:11.915536+00:00 app[web.1]: Tue, 14 Aug 2018 17:09:11 GMT democracyos:server-factory:ssl Using redirection to HTTPS compatible with reverse-proxies (e.g.: Heroku/Nodejitsu/nginx)
2018-08-14T17:09:11.916829+00:00 app[web.1]: Tue, 14 Aug 2018 17:09:11 GMT democracyos:server-factory:ssl **WARNING** Do NOT use if not behind a reverse proxy; this can be easily spoofed in a direct client/server connection!
2018-08-14T17:09:12.373089+00:00 app[web.1]: module.js:478
2018-08-14T17:09:12.373110+00:00 app[web.1]: ^
2018-08-14T17:09:12.373108+00:00 app[web.1]: throw err;
2018-08-14T17:09:12.373112+00:00 app[web.1]: 
2018-08-14T17:09:12.373116+00:00 app[web.1]: Error: Cannot find module 'is-my-schema-valid'
2018-08-14T17:09:12.373119+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:476:15)
2018-08-14T17:09:12.373121+00:00 app[web.1]: at Function.Module._load (module.js:424:25)
2018-08-14T17:09:12.373122+00:00 app[web.1]: at Module.require (module.js:504:17)
2018-08-14T17:09:12.373124+00:00 app[web.1]: at require (internal/module.js:20:19)
2018-08-14T17:09:12.373127+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/is-express-schema-valid/index.js:7:24)
2018-08-14T17:09:12.373129+00:00 app[web.1]: at Module._compile (module.js:577:32)
2018-08-14T17:09:12.373132+00:00 app[web.1]: at Module.load (module.js:494:32)
2018-08-14T17:09:12.373134+00:00 app[web.1]: at tryModuleLoad (module.js:453:12)
2018-08-14T17:09:12.373131+00:00 app[web.1]: at Object.Module._extensions..js (module.js:586:10)
2018-08-14T17:09:12.373135+00:00 app[web.1]: at Function.Module._load (module.js:445:3)
2018-08-14T17:09:12.373137+00:00 app[web.1]: at Module.require (module.js:504:17)
2018-08-14T17:09:12.373138+00:00 app[web.1]: at require (internal/module.js:20:19)
2018-08-14T17:09:12.373142+00:00 app[web.1]: at Object.<anonymous> (/app/lib/api-v2/validate/index.js:1:118)
2018-08-14T17:09:12.373143+00:00 app[web.1]: at Module._compile (module.js:577:32)
2018-08-14T17:09:12.373145+00:00 app[web.1]: at Object.Module._extensions..js (module.js:586:10)
2018-08-14T17:09:12.373147+00:00 app[web.1]: at Module.load (module.js:494:32)
2018-08-14T17:09:12.477648+00:00 heroku[web.1]: Process exited with status 1
2018-08-14T17:09:12.500783+00:00 heroku[web.1]: State changed from starting to crashed
2018-08-14T17:09:12.503670+00:00 heroku[web.1]: State changed from crashed to starting
2018-08-14T17:09:21.944468+00:00 heroku[web.1]: Starting process with command `NODE_PATH=. PUBLIC_PORT=80 node index.js`
2018-08-14T17:09:26.180789+00:00 app[web.1]: Tue, 14 Aug 2018 17:09:26 GMT democracyos:server-factory:ssl Using redirection to HTTPS compatible with reverse-proxies (e.g.: Heroku/Nodejitsu/nginx)
2018-08-14T17:09:26.182509+00:00 app[web.1]: Tue, 14 Aug 2018 17:09:26 GMT democracyos:server-factory:ssl **WARNING** Do NOT use if not behind a reverse proxy; this can be easily spoofed in a direct client/server connection!
2018-08-14T17:09:26.840676+00:00 app[web.1]: module.js:478
2018-08-14T17:09:26.840697+00:00 app[web.1]: throw err;
2018-08-14T17:09:26.840704+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:476:15)
2018-08-14T17:09:26.840698+00:00 app[web.1]: ^
2018-08-14T17:09:26.840708+00:00 app[web.1]: at Module.require (module.js:504:17)
2018-08-14T17:09:26.840709+00:00 app[web.1]: at require (internal/module.js:20:19)
2018-08-14T17:09:26.840702+00:00 app[web.1]: Error: Cannot find module 'is-my-schema-valid'
2018-08-14T17:09:26.840700+00:00 app[web.1]: 
2018-08-14T17:09:26.840728+00:00 app[web.1]: at Module._compile (module.js:577:32)
2018-08-14T17:09:26.840730+00:00 app[web.1]: at Object.Module._extensions..js (module.js:586:10)
2018-08-14T17:09:26.840731+00:00 app[web.1]: at Module.load (module.js:494:32)
2018-08-14T17:09:26.840733+00:00 app[web.1]: at tryModuleLoad (module.js:453:12)
2018-08-14T17:09:26.840734+00:00 app[web.1]: at Function.Module._load (module.js:445:3)
2018-08-14T17:09:26.840711+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/is-express-schema-valid/index.js:7:24)
2018-08-14T17:09:26.840736+00:00 app[web.1]: at Module.require (module.js:504:17)
2018-08-14T17:09:26.840737+00:00 app[web.1]: at require (internal/module.js:20:19)
2018-08-14T17:09:26.840706+00:00 app[web.1]: at Function.Module._load (module.js:424:25)
2018-08-14T17:09:26.840739+00:00 app[web.1]: at Object.<anonymous> (/app/lib/api-v2/validate/index.js:1:118)
2018-08-14T17:09:26.840740+00:00 app[web.1]: at Module._compile (module.js:577:32)
2018-08-14T17:09:26.840742+00:00 app[web.1]: at Object.Module._extensions..js (module.js:586:10)
2018-08-14T17:09:26.840743+00:00 app[web.1]: at Module.load (module.js:494:32)
2018-08-14T17:09:26.947922+00:00 heroku[web.1]: State changed from starting to crashed
2018-08-14T17:09:26.930781+00:00 heroku[web.1]: Process exited with status 1
2018-08-14T17:09:50.949605+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=janswaraj.herokuapp.com request_id=8a85a32f-059e-4cee-9e3a-8053bf160de6 fwd="1.186.213.188" dyno= connect= service= status=503 bytes= protocol=https
2018-08-14T17:09:52.573481+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=janswaraj.herokuapp.com request_id=09160378-771d-4805-8e32-e5a31a4e0f6c fwd="1.186.213.188" dyno= connect= service= status=503 bytes= protocol=https
atcha commented 5 years ago

Hello, i have a quite similar problem :

2019-01-06T19:12:30.482428+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:586:10)

2019-01-06T19:12:30.482429+00:00 app[web.1]:     at Module.load (module.js:494:32)

2019-01-06T19:12:30.482430+00:00 app[web.1]:     at tryModuleLoad (module.js:453:12)

2019-01-06T19:12:30.482432+00:00 app[web.1]:     at Function.Module._load (module.js:445:3)

2019-01-06T19:12:30.482433+00:00 app[web.1]:     at Module.require (module.js:504:17)

2019-01-06T19:12:30.482434+00:00 app[web.1]:     at require (internal/module.js:20:19)

2019-01-06T19:12:30.482436+00:00 app[web.1]:     at Object.<anonymous> (/app/lib/api-v2/validate/index.js:1:118)

2019-01-06T19:12:30.482438+00:00 app[web.1]:     at Module._compile (module.js:577:32)

2019-01-06T19:12:30.482439+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:586:10)

2019-01-06T19:12:30.482440+00:00 app[web.1]:     at Module.load (module.js:494:32)

2019-01-06T19:13:13.952601+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=contribution-poitierscollectif.herokuapp.com request_id=594a3d73-04ed-48a6-aaa1-2d111f4ef879 fwd="82.247.143.15" dyno= connect= service= status=503 bytes= protocol=https

Is someone find a solution ?

hagir7 commented 5 years ago

I used the following command npm install --save is-my-schema-valid Then pushed changes to heroku. This was enough to fix this issue