Javascript-форум (https://javascript.ru/forum/)
-   Events/DOM/Window (https://javascript.ru/forum/events/)
-   -   Не запускается приложение Node js через Heroku (https://javascript.ru/forum/events/81480-ne-zapuskaetsya-prilozhenie-node-js-cherez-heroku.html)

MaksiMilian789 03.12.2020 21:46

Не запускается приложение Node js через Heroku
 
Добрый день.
Залил приложение через Git на Heroku, однако оно не запускается.
Как я понял, ошибка events.js:291, что это может быть?
Работал через Node js с использованием Socket.io

var express = require('express');
var fs = require('fs');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io').listen(server);
var canvas;

server.listen(80);


Логи:
2020-12-03T18:39:20.373500+00:00 heroku[web.1]: State changed from crashed to starting
2020-12-03T18:39:23.631474+00:00 heroku[web.1]: Starting process with command `npm start`
2020-12-03T18:39:24.000000+00:00 app[api]: Build succeeded
2020-12-03T18:39:25.760515+00:00 app[web.1]:
2020-12-03T18:39:25.760528+00:00 app[web.1]: > chat@1.0.0 start /app
2020-12-03T18:39:25.760528+00:00 app[web.1]: > node index.js
2020-12-03T18:39:25.760529+00:00 app[web.1]:
2020-12-03T18:39:25.950966+00:00 app[web.1]: events.js:291
2020-12-03T18:39:25.950968+00:00 app[web.1]: throw er; // Unhandled 'error' event
2020-12-03T18:39:25.950968+00:00 app[web.1]: ^
2020-12-03T18:39:25.950968+00:00 app[web.1]:
2020-12-03T18:39:25.950969+00:00 app[web.1]: Error: listen EACCES: permission denied 0.0.0.0:80
2020-12-03T18:39:25.950969+00:00 app[web.1]: at Server.setupListenHandle [as _listen2] (net.js:1299:21)
2020-12-03T18:39:25.950969+00:00 app[web.1]: at listenInCluster (net.js:1364:12)
2020-12-03T18:39:25.950970+00:00 app[web.1]: at Server.listen (net.js:1450:7)
2020-12-03T18:39:25.950970+00:00 app[web.1]: at Object.<anonymous> (/app/index.js:8:8)
2020-12-03T18:39:25.950970+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:999:30)
2020-12-03T18:39:25.950970+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
2020-12-03T18:39:25.950971+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:863:32)
2020-12-03T18:39:25.950971+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:708:14)
2020-12-03T18:39:25.950971+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
2020-12-03T18:39:25.950972+00:00 app[web.1]: at internal/main/run_main_module.js:17:47
2020-12-03T18:39:25.950972+00:00 app[web.1]: Emitted 'error' event on Server instance at:
2020-12-03T18:39:25.950972+00:00 app[web.1]: at emitErrorNT (net.js:1343:8)
2020-12-03T18:39:25.950972+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:84:21) {
2020-12-03T18:39:25.950973+00:00 app[web.1]: code: 'EACCES',
2020-12-03T18:39:25.950973+00:00 app[web.1]: errno: 'EACCES',
2020-12-03T18:39:25.950973+00:00 app[web.1]: syscall: 'listen',
2020-12-03T18:39:25.950973+00:00 app[web.1]: address: '0.0.0.0',
2020-12-03T18:39:25.950973+00:00 app[web.1]: port: 80
2020-12-03T18:39:25.950974+00:00 app[web.1]: }
2020-12-03T18:39:25.963723+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-12-03T18:39:25.963964+00:00 app[web.1]: npm ERR! errno 1
2020-12-03T18:39:25.968748+00:00 app[web.1]: npm ERR! chat@1.0.0 start: `node index.js`
2020-12-03T18:39:25.968863+00:00 app[web.1]: npm ERR! Exit status 1
2020-12-03T18:39:25.968997+00:00 app[web.1]: npm ERR!
2020-12-03T18:39:25.969093+00:00 app[web.1]: npm ERR! Failed at the chat@1.0.0 start script.
2020-12-03T18:39:25.969165+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-12-03T18:39:25.976136+00:00 app[web.1]:
2020-12-03T18:39:25.976309+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-12-03T18:39:25.976416+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2020-12-03T18_39_25_969Z-debug.log
2020-12-03T18:39:26.027284+00:00 heroku[web.1]: Process exited with status 1
2020-12-03T18:39:26.070313+00:00 heroku[web.1]: State changed from starting to crashed
2020-12-03T18:39:26.075487+00:00 heroku[web.1]: State changed from crashed to starting
2020-12-03T18:39:29.212352+00:00 heroku[web.1]: Starting process with command `npm start`
2020-12-03T18:39:34.847917+00:00 app[web.1]:
2020-12-03T18:39:34.848022+00:00 app[web.1]: > chat@1.0.0 start /app
2020-12-03T18:39:34.848023+00:00 app[web.1]: > node index.js
2020-12-03T18:39:34.848024+00:00 app[web.1]:
2020-12-03T18:39:35.054836+00:00 app[web.1]: events.js:291
2020-12-03T18:39:35.054842+00:00 app[web.1]: throw er; // Unhandled 'error' event
2020-12-03T18:39:35.054842+00:00 app[web.1]: ^
2020-12-03T18:39:35.054843+00:00 app[web.1]:
2020-12-03T18:39:35.054849+00:00 app[web.1]: Error: listen EACCES: permission denied 0.0.0.0:80
2020-12-03T18:39:35.054849+00:00 app[web.1]: at Server.setupListenHandle [as _listen2] (net.js:1299:21)
2020-12-03T18:39:35.054850+00:00 app[web.1]: at listenInCluster (net.js:1364:12)
2020-12-03T18:39:35.054850+00:00 app[web.1]: at Server.listen (net.js:1450:7)
2020-12-03T18:39:35.054850+00:00 app[web.1]: at Object.<anonymous> (/app/index.js:8:8)
2020-12-03T18:39:35.054850+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:999:30)
2020-12-03T18:39:35.054853+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
2020-12-03T18:39:35.054853+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:863:32)
2020-12-03T18:39:35.054854+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:708:14)
2020-12-03T18:39:35.054857+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
2020-12-03T18:39:35.054857+00:00 app[web.1]: at internal/main/run_main_module.js:17:47
2020-12-03T18:39:35.054857+00:00 app[web.1]: Emitted 'error' event on Server instance at:
2020-12-03T18:39:35.054857+00:00 app[web.1]: at emitErrorNT (net.js:1343:8)
2020-12-03T18:39:35.054858+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:84:21) {
2020-12-03T18:39:35.054861+00:00 app[web.1]: code: 'EACCES',
2020-12-03T18:39:35.054861+00:00 app[web.1]: errno: 'EACCES',
2020-12-03T18:39:35.054861+00:00 app[web.1]: syscall: 'listen',
2020-12-03T18:39:35.054861+00:00 app[web.1]: address: '0.0.0.0',
2020-12-03T18:39:35.054862+00:00 app[web.1]: port: 80
2020-12-03T18:39:35.054862+00:00 app[web.1]: }
2020-12-03T18:39:35.066026+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-12-03T18:39:35.066282+00:00 app[web.1]: npm ERR! errno 1
2020-12-03T18:39:35.071931+00:00 app[web.1]: npm ERR! chat@1.0.0 start: `node index.js`
2020-12-03T18:39:35.072059+00:00 app[web.1]: npm ERR! Exit status 1
2020-12-03T18:39:35.072286+00:00 app[web.1]: npm ERR!
2020-12-03T18:39:35.072493+00:00 app[web.1]: npm ERR! Failed at the chat@1.0.0 start script.
2020-12-03T18:39:35.072794+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-12-03T18:39:35.230999+00:00 app[web.1]:
2020-12-03T18:39:35.231166+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-12-03T18:39:35.231242+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2020-12-03T18_39_35_073Z-debug.log
2020-12-03T18:39:35.280056+00:00 heroku[web.1]: Process exited with status 1
2020-12-03T18:39:35.314433+00:00 heroku[web.1]: State changed from starting to crashed
2020-12-03T18:39:36.247212+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=crocogame.herokuapp.com request_id=f906de4a-da6e-4636-952c-89461fbaa778 fwd="212.164.65.183" dyno= connect= service= status=503 bytes= protocol=https
2020-12-03T18:39:36.824522+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=crocogame.herokuapp.com request_id=732f82e8-16ef-48d5-a07a-35324fde0ec9 fwd="212.164.65.183" dyno= connect= service= status=503 bytes= protocol=https


Часовой пояс GMT +3, время: 19:39.