“ npm ERR!代码ELIFECYCLE”错误Heroku部署

时间:2018-12-01 04:42:01

标签: node.js heroku

我试图将具有[this] [1] becaon库的Node.js应用程序部署到Heroku中。 Heroku日志显示错误可能是由于启动脚本引起的,但是我的启动脚本没有问题。当我将应用程序部署到Heroku时,出现以下错误:

当我在本地运行节点index.js时,没有任何错误。但是该应用程序无法在Heroku上运行

 Warning: heroku update available from 7.0.49 to 7.18.10
2018-12-01T04:06:34.300391+00:00 heroku[web.1]: Starting process with command `npm start`
2018-12-01T04:06:35.940335+00:00 app[web.1]:
2018-12-01T04:06:35.940352+00:00 app[web.1]: > beacon@1.0.0 start /app
2018-12-01T04:06:35.940354+00:00 app[web.1]: > node index.js
2018-12-01T04:06:35.940355+00:00 app[web.1]:
2018-12-01T04:06:36.182490+00:00 app[web.1]: node: ../deps/uv/src/unix/poll.c:120: uv_poll_start: Assertion `!(((handle)->flags & (UV_CLOSING | UV_CLOSED)) != 0)' failed.
2018-12-01T04:06:36.185072+00:00 app[web.1]: Aborted
2018-12-01T04:06:36.188032+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-12-01T04:06:36.188313+00:00 app[web.1]: npm ERR! errno 134
2018-12-01T04:06:36.189384+00:00 app[web.1]: npm ERR! beacon@1.0.0 start: `node index.js`
2018-12-01T04:06:36.189493+00:00 app[web.1]: npm ERR! Exit status 134
2018-12-01T04:06:36.189660+00:00 app[web.1]: npm ERR!
2018-12-01T04:06:36.189769+00:00 app[web.1]: npm ERR! Failed at the beacon@1.0.0 start script.
2018-12-01T04:06:36.189870+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-12-01T04:06:36.196620+00:00 app[web.1]:
2018-12-01T04:06:36.197883+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-12-01T04:06:36.197884+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2018-12-01T04_06_36_191Z-debug.log
2018-12-01T04:06:36.252135+00:00 heroku[web.1]: Process exited with status 134
2018-12-01T04:06:36.269181+00:00 heroku[web.1]: State changed from starting to crashed
2018-12-01T04:06:36.271462+00:00 heroku[web.1]: State changed from crashed to starting
2018-12-01T04:06:38.878330+00:00 heroku[web.1]: Starting process with command `npm start`
2018-12-01T04:06:41.389907+00:00 app[web.1]: node: ../deps/uv/src/unix/poll.c:120: uv_poll_start: Assertion `!(((handle)->flags & (UV_CLOSING | UV_CLOSED)) != 0)' failed.
2018-12-01T04:06:41.399890+00:00 app[web.1]: Aborted
2018-12-01T04:06:41.414233+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-12-01T04:06:41.415046+00:00 app[web.1]: npm ERR! errno 134
2018-12-01T04:06:41.415963+00:00 app[web.1]: npm ERR! beacon@1.0.0 start: `node index.js`
2018-12-01T04:06:41.416136+00:00 app[web.1]: npm ERR! Exit status 134
2018-12-01T04:06:41.416369+00:00 app[web.1]: npm ERR!
2018-12-01T04:06:41.416552+00:00 app[web.1]: npm ERR! Failed at the beacon@1.0.0 start script.
2018-12-01T04:06:41.416721+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-12-01T04:06:41.424049+00:00 app[web.1]:
2018-12-01T04:06:41.428265+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-12-01T04:06:41.428268+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2018-12-01T04_06_41_418Z-debug.log
2018-12-01T04:06:41.108083+00:00 app[web.1]:
2018-12-01T04:06:41.108108+00:00 app[web.1]: > beacon@1.0.0 start /app
2018-12-01T04:06:41.108110+00:00 app[web.1]: > node index.js
2018-12-01T04:06:41.108111+00:00 app[web.1]:
2018-12-01T04:06:41.596884+00:00 heroku[web.1]: State changed from starting to crashed
2018-12-01T04:06:41.485308+00:00 heroku[web.1]: Process exited with status 134
2018-12-01T04:07:26.397433+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-earth-56576.herokuapp.com request_id=d07bc3c2-d97c-42e1-9dd6-9898eb760ac4 fwd="71.82.55.26" dyno= connect= service= status=503 bytes= protocol=https
2018-12-01T04:07:26.994317+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shrouded-earth-56576.herokuapp.com request_id=dd732048-d3f9-44e9-98d2-46eb8cc85cda fwd="71.82.55.26" dyno= connect= service= status=503 bytes= protocol=https
2018-12-01T04:13:25.564521+00:00 heroku[web.1]: State changed from crashed to starting
2018-12-01T04:13:27.647004+00:00 heroku[web.1]: Starting process with command `npm start`
2018-12-01T04:13:29.564971+00:00 heroku[web.1]: Process exited with status 134
2018-12-01T04:13:29.294660+00:00 app[web.1]:
2018-12-01T04:13:29.294685+00:00 app[web.1]: > beacon@1.0.0 start /app
2018-12-01T04:13:29.294687+00:00 app[web.1]: > node index.js
2018-12-01T04:13:29.294688+00:00 app[web.1]:
2018-12-01T04:13:29.510248+00:00 app[web.1]: node: ../deps/uv/src/unix/poll.c:120: uv_poll_start: Assertion `!(((handle)->flags & (UV_CLOSING | UV_CLOSED)) != 0)' failed.
2018-12-01T04:13:29.513133+00:00 app[web.1]: Aborted
2018-12-01T04:13:29.516318+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-12-01T04:13:29.516650+00:00 app[web.1]: npm ERR! errno 134
2018-12-01T04:13:29.517766+00:00 app[web.1]: npm ERR! beacon@1.0.0 start: `node index.js`
2018-12-01T04:13:29.517871+00:00 app[web.1]: npm ERR! Exit status 134
2018-12-01T04:13:29.518068+00:00 app[web.1]: npm ERR!
2018-12-01T04:13:29.518177+00:00 app[web.1]: npm ERR! Failed at the beacon@1.0.0 start script.
2018-12-01T04:13:29.518300+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-12-01T04:13:29.523910+00:00 app[web.1]:
2018-12-01T04:13:29.524106+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-12-01T04:13:29.524250+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2018-12-01T04_13_29_519Z-debug.log
2018-12-01T04:13:29.599675+00:00 heroku[web.1]: State changed from starting to crashed
2018-12-01T04:13:31.494135+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-earth-56576.herokuapp.com request_id=67443cd5-7197-4ef7-a0b0-2a5491d9e4d6 fwd="71.82.55.26" dyno= connect= service= status=503 bytes= protocol=https
2018-12-01T04:13:33.189065+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shrouded-earth-56576.herokuapp.com request_id=0146892f-fab3-4636-ad2d-b1f8d03800e5 fwd="71.82.55.26" dyno= connect= service= status=503 bytes= protocol=https
2018-12-01T04:21:18.599016+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-earth-56576.herokuapp.com request_id=72ad062c-7a36-4b87-9aae-b4c661284deb fwd="71.82.55.26" dyno= connect= service= status=503 bytes= protocol=https
2018-12-01T04:21:20.379722+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shrouded-earth-56576.herokuapp.com request_id=bf46325b-6def-4060-b091-a14d5764f01c fwd="71.82.55.26" dyno= connect= service= status=503 bytes= protocol=https
2018-12-01T04:24:03.236771+00:00 heroku[web.1]: State changed from crashed to starting
2018-12-01T04:24:07.724222+00:00 app[web.1]: Aborted
2018-12-01T04:24:07.727689+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-12-01T04:24:07.728039+00:00 app[web.1]: npm ERR! errno 134
2018-12-01T04:24:07.729239+00:00 app[web.1]: npm ERR! beacon@1.0.0 start: `node index.js`
2018-12-01T04:24:07.729410+00:00 app[web.1]: npm ERR! Exit status 134
2018-12-01T04:24:07.729636+00:00 app[web.1]: npm ERR!
2018-12-01T04:24:07.729806+00:00 app[web.1]: npm ERR! Failed at the beacon@1.0.0 start script.
2018-12-01T04:24:07.729961+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-12-01T04:24:07.733417+00:00 app[web.1]:
2018-12-01T04:24:07.733683+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-12-01T04:24:07.733804+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2018-12-01T04_24_07_731Z-debug.log
2018-12-01T04:24:07.471562+00:00 app[web.1]:
2018-12-01T04:24:07.471584+00:00 app[web.1]: > beacon@1.0.0 start /app
2018-12-01T04:24:07.471586+00:00 app[web.1]: > node index.js
2018-12-01T04:24:07.471587+00:00 app[web.1]:
2018-12-01T04:24:07.721101+00:00 app[web.1]: node: ../deps/uv/src/unix/poll.c:120: uv_poll_start: Assertion `!(((handle)->flags & (UV_CLOSING | UV_CLOSED)) != 0)' failed.
2018-12-01T04:24:07.796807+00:00 heroku[web.1]: Process exited with status 134

这是我的packgae.json

{
  "name": "beacon",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "node index.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
    "bluetooth-hci-socket": "^0.5.1",
    "body-parser": "^1.18.3",
    "ejs": "^2.6.1",
    "express": "^4.16.4",
    "noble": "^1.9.1",
    "node-beacon-scanner": "^0.1.0",
    "node-gyp": "^3.8.0",
    "rebuild": "^0.1.2"
  },
  "engines": {
    "node": "8.11.1"
  },

  "author": "sas",
  "license": "ISC"
}

编辑1 完整日志:

Warning: heroku update available from 7.0.49 to 7.18.10
2018-12-01T04:06:35.940354+00:00 app[web.1]: > node index.js
2018-12-01T04:06:35.940355+00:00 app[web.1]:
2018-12-01T04:06:36.182490+00:00 app[web.1]: node: ../deps/uv/src/unix/poll.c:120: uv_poll_start: Assertion `!(((handle)->flags & (UV_CLOSING | UV_CLOSED)) != 0)' failed.
2018-12-01T04:06:36.185072+00:00 app[web.1]: Aborted
2018-12-01T04:06:36.188032+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-12-01T04:06:36.188313+00:00 app[web.1]: npm ERR! errno 134
2018-12-01T04:06:36.189384+00:00 app[web.1]: npm ERR! beacon@1.0.0 start: `node index.js`
2018-12-01T04:06:36.189493+00:00 app[web.1]: npm ERR! Exit status 134
2018-12-01T04:06:36.189660+00:00 app[web.1]: npm ERR!
2018-12-01T04:06:36.189769+00:00 app[web.1]: npm ERR! Failed at the beacon@1.0.0 start script.
2018-12-01T04:06:36.189870+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-12-01T04:06:36.196620+00:00 app[web.1]:
2018-12-01T04:06:36.197883+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-12-01T04:06:36.197884+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2018-12-01T04_06_36_191Z-debug.log
2018-12-01T04:06:36.252135+00:00 heroku[web.1]: Process exited with status 134
2018-12-01T04:06:36.269181+00:00 heroku[web.1]: State changed from starting to crashed
2018-12-01T04:06:36.271462+00:00 heroku[web.1]: State changed from crashed to starting
2018-12-01T04:06:38.878330+00:00 heroku[web.1]: Starting process with command `npm start`
2018-12-01T04:06:41.389907+00:00 app[web.1]: node: ../deps/uv/src/unix/poll.c:120: uv_poll_start: Assertion `!(((handle)->flags & (UV_CLOSING | UV_CLOSED)) != 0)' failed.
2018-12-01T04:06:41.399890+00:00 app[web.1]: Aborted
2018-12-01T04:06:41.414233+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-12-01T04:06:41.415046+00:00 app[web.1]: npm ERR! errno 134
2018-12-01T04:06:41.415963+00:00 app[web.1]: npm ERR! beacon@1.0.0 start: `node index.js`
2018-12-01T04:06:41.416136+00:00 app[web.1]: npm ERR! Exit status 134
2018-12-01T04:06:41.416369+00:00 app[web.1]: npm ERR!
2018-12-01T04:06:41.416552+00:00 app[web.1]: npm ERR! Failed at the beacon@1.0.0 start script.
2018-12-01T04:06:41.416721+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-12-01T04:06:41.424049+00:00 app[web.1]:
2018-12-01T04:06:41.428265+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-12-01T04:06:41.428268+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2018-12-01T04_06_41_418Z-debug.log
2018-12-01T04:06:41.108083+00:00 app[web.1]:
2018-12-01T04:06:41.108108+00:00 app[web.1]: > beacon@1.0.0 start /app
2018-12-01T04:06:41.108110+00:00 app[web.1]: > node index.js
2018-12-01T04:06:41.108111+00:00 app[web.1]:
2018-12-01T04:06:41.596884+00:00 heroku[web.1]: State changed from starting to crashed
2018-12-01T04:06:41.485308+00:00 heroku[web.1]: Process exited with status 134
2018-12-01T04:07:26.397433+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-earth-56576.herokuapp.com request_id=d07bc3c2-d97c-42e1-9dd6-9898eb760ac4 fwd="71.82.55.26" dyno= connect= service= status=503 bytes= protocol=https
2018-12-01T04:07:26.994317+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shrouded-earth-56576.herokuapp.com request_id=dd732048-d3f9-44e9-98d2-46eb8cc85cda fwd="71.82.55.26" dyno= connect= service= status=503 bytes= protocol=https
2018-12-01T04:13:25.564521+00:00 heroku[web.1]: State changed from crashed to starting
2018-12-01T04:13:27.647004+00:00 heroku[web.1]: Starting process with command `npm start`
2018-12-01T04:13:29.564971+00:00 heroku[web.1]: Process exited with status 134
2018-12-01T04:13:29.294660+00:00 app[web.1]:
2018-12-01T04:13:29.294685+00:00 app[web.1]: > beacon@1.0.0 start /app
2018-12-01T04:13:29.294687+00:00 app[web.1]: > node index.js
2018-12-01T04:13:29.294688+00:00 app[web.1]:
2018-12-01T04:13:29.510248+00:00 app[web.1]: node: ../deps/uv/src/unix/poll.c:120: uv_poll_start: Assertion `!(((handle)->flags & (UV_CLOSING | UV_CLOSED)) != 0)' failed.
2018-12-01T04:13:29.513133+00:00 app[web.1]: Aborted
2018-12-01T04:13:29.516318+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-12-01T04:13:29.516650+00:00 app[web.1]: npm ERR! errno 134
2018-12-01T04:13:29.517766+00:00 app[web.1]: npm ERR! beacon@1.0.0 start: `node index.js`
2018-12-01T04:13:29.517871+00:00 app[web.1]: npm ERR! Exit status 134
2018-12-01T04:13:29.518068+00:00 app[web.1]: npm ERR!
2018-12-01T04:13:29.518177+00:00 app[web.1]: npm ERR! Failed at the beacon@1.0.0 start script.
2018-12-01T04:13:29.518300+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-12-01T04:13:29.523910+00:00 app[web.1]:
2018-12-01T04:13:29.524106+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-12-01T04:13:29.524250+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2018-12-01T04_13_29_519Z-debug.log
2018-12-01T04:13:29.599675+00:00 heroku[web.1]: State changed from starting to crashed
2018-12-01T04:13:31.494135+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-earth-56576.herokuapp.com request_id=67443cd5-7197-4ef7-a0b0-2a5491d9e4d6 fwd="71.82.55.26" dyno= connect= service= status=503 bytes= protocol=https
2018-12-01T04:13:33.189065+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shrouded-earth-56576.herokuapp.com request_id=0146892f-fab3-4636-ad2d-b1f8d03800e5 fwd="71.82.55.26" dyno= connect= service= status=503 bytes= protocol=https
2018-12-01T04:21:18.599016+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-earth-56576.herokuapp.com request_id=72ad062c-7a36-4b87-9aae-b4c661284deb fwd="71.82.55.26" dyno= connect= service= status=503 bytes= protocol=https
2018-12-01T04:21:20.379722+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shrouded-earth-56576.herokuapp.com request_id=bf46325b-6def-4060-b091-a14d5764f01c fwd="71.82.55.26" dyno= connect= service= status=503 bytes= protocol=https
2018-12-01T04:24:03.236771+00:00 heroku[web.1]: State changed from crashed to starting
2018-12-01T04:24:07.724222+00:00 app[web.1]: Aborted
2018-12-01T04:24:07.727689+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-12-01T04:24:07.728039+00:00 app[web.1]: npm ERR! errno 134
2018-12-01T04:24:07.729239+00:00 app[web.1]: npm ERR! beacon@1.0.0 start: `node index.js`
2018-12-01T04:24:07.729410+00:00 app[web.1]: npm ERR! Exit status 134
2018-12-01T04:24:07.729636+00:00 app[web.1]: npm ERR!
2018-12-01T04:24:07.729806+00:00 app[web.1]: npm ERR! Failed at the beacon@1.0.0 start script.
2018-12-01T04:24:07.729961+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-12-01T04:24:07.733417+00:00 app[web.1]:
2018-12-01T04:24:07.733683+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-12-01T04:24:07.733804+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2018-12-01T04_24_07_731Z-debug.log
2018-12-01T04:24:07.471562+00:00 app[web.1]:
2018-12-01T04:24:07.471584+00:00 app[web.1]: > beacon@1.0.0 start /app
2018-12-01T04:24:07.471586+00:00 app[web.1]: > node index.js
2018-12-01T04:24:07.471587+00:00 app[web.1]:
2018-12-01T04:24:07.721101+00:00 app[web.1]: node: ../deps/uv/src/unix/poll.c:120: uv_poll_start: Assertion `!(((handle)->flags & (UV_CLOSING | UV_CLOSED)) != 0)' failed.
2018-12-01T04:24:07.796807+00:00 heroku[web.1]: Process exited with status 134
2018-12-01T04:45:54.163823+00:00 heroku[web.1]: State changed from crashed to starting
2018-12-01T04:45:57.333106+00:00 heroku[web.1]: Starting process with command `npm start`
2018-12-01T04:46:00.197869+00:00 app[web.1]:
2018-12-01T04:46:00.197897+00:00 app[web.1]: > beacon@1.0.0 start /app
2018-12-01T04:46:00.197899+00:00 app[web.1]: > node index.js
2018-12-01T04:46:00.197900+00:00 app[web.1]:
2018-12-01T04:46:00.626118+00:00 app[web.1]: node: ../deps/uv/src/unix/poll.c:120: uv_poll_start: Assertion `!(((handle)->flags & (UV_CLOSING | UV_CLOSED)) != 0)' failed.
2018-12-01T04:46:00.630209+00:00 app[web.1]: Aborted
2018-12-01T04:46:00.642201+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-12-01T04:46:00.642204+00:00 app[web.1]: npm ERR! errno 134
2018-12-01T04:46:00.642215+00:00 app[web.1]: npm ERR! beacon@1.0.0 start: `node index.js`
2018-12-01T04:46:00.642217+00:00 app[web.1]: npm ERR! Exit status 134
2018-12-01T04:46:00.642220+00:00 app[web.1]: npm ERR!
2018-12-01T04:46:00.642224+00:00 app[web.1]: npm ERR! Failed at the beacon@1.0.0 start script.
2018-12-01T04:46:00.649736+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-12-01T04:46:00.671528+00:00 app[web.1]:
2018-12-01T04:46:00.671785+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-12-01T04:46:00.671953+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2018-12-0s

0 个答案:

没有答案