Ошибка Heroku Не удается развернуть приложение Node JS - PullRequest
0 голосов
/ 06 мая 2020

Привет. Все, так недавно я попытался развернуть приложение, которое я сделал с помощью Node JS, и попытался развернуть его heroku, и были сделаны следующие ошибки ...

2020-05-06T03:38:31.274907+00:00 app[web.1]: npm ERR! nators@1.0.0 start: `nodemon server.js`
2020-05-06T03:38:31.275075+00:00 app[web.1]: npm ERR! spawn ENOENT
2020-05-06T03:38:31.275266+00:00 app[web.1]: npm ERR!
2020-05-06T03:38:31.275438+00:00 app[web.1]: npm ERR! Failed at the nators@1.0.0 start script.
2020-05-06T03:38:31.275587+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-05-06T03:38:31.310898+00:00 app[web.1]:
2020-05-06T03:38:31.312621+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-05-06T03:38:31.312780+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2020-05-06T03_38_31_276Z-debug.log2020-05-06T06:16:05.000000+00:00 app[api]: Build started by user kshtjdutt07@gmail.com
2020-05-06T06:17:13.447637+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-06T06:17:13.234049+00:00 app[api]: Release v10 created by user kshtjdutt07@gmail.com
2020-05-06T06:17:13.234049+00:00 app[api]: Deploy 0b75b2ae by user kshtjdutt07@gmail.com
2020-05-06T06:17:20.000000+00:00 app[api]: Build succeeded
2020-05-06T06:17:26.466895+00:00 app[web.1]:
2020-05-06T06:17:26.466920+00:00 app[web.1]: > nators@1.0.0 start /app
2020-05-06T06:17:26.466920+00:00 app[web.1]: > node server.js
2020-05-06T06:17:26.466921+00:00 app[web.1]:
2020-05-06T06:17:27.252788+00:00 app[web.1]: /app/server.js:18
2020-05-06T06:17:27.252827+00:00 app[web.1]: const DB = process.env.DATABASE.replace(
2020-05-06T06:17:27.252827+00:00 app[web.1]: ^
2020-05-06T06:17:27.252828+00:00 app[web.1]:
2020-05-06T06:17:27.252829+00:00 app[web.1]: TypeError: Cannot read property 'replace' of undefined
2020-05-06T06:17:27.252829+00:00 app[web.1]: at Object.<anonymous> (/app/server.js:18:33)
2020-05-06T06:17:27.252829+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1176:30)
2020-05-06T06:17:27.252830+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
2020-05-06T06:17:27.252830+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:1040:32)
2020-05-06T06:17:27.252831+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:929:14)
2020-05-06T06:17:27.252831+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
2020-05-06T06:17:27.252832+00:00 app[web.1]: at internal/main/run_main_module.js:17:47
2020-05-06T06:17:27.276468+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-05-06T06:17:27.277052+00:00 app[web.1]: npm ERR! errno 1
2020-05-06T06:17:27.278742+00:00 app[web.1]: npm ERR! nators@1.0.0 start: `node server.js`
2020-05-06T06:17:27.279030+00:00 app[web.1]: npm ERR! Exit status 1
2020-05-06T06:17:27.279307+00:00 app[web.1]: npm ERR!
2020-05-06T06:17:27.279550+00:00 app[web.1]: npm ERR! Failed at the nators@1.0.0 start script.
2020-05-06T06:17:27.279897+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-05-06T06:17:27.288957+00:00 app[web.1]:
2020-05-06T06:17:27.290994+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-05-06T06:17:27.291216+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2020-05-06T06_17_27_281Z-debug.log2020-05-06T06:17:27.407185+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-06T06:17:27.410538+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-06T06:17:37.364145+00:00 app[web.1]:
2020-05-06T06:17:37.364182+00:00 app[web.1]: > nators@1.0.0 start /app
2020-05-06T06:17:37.364182+00:00 app[web.1]: > node server.js
2020-05-06T06:17:37.364183+00:00 app[web.1]:
2020-05-06T06:17:37.997903+00:00 app[web.1]: /app/server.js:18
2020-05-06T06:17:37.997940+00:00 app[web.1]: const DB = process.env.DATABASE.replace(
2020-05-06T06:17:37.997940+00:00 app[web.1]: ^
2020-05-06T06:17:37.997942+00:00 app[web.1]:
2020-05-06T06:17:37.997943+00:00 app[web.1]: TypeError: Cannot read property 'replace' of undefined
2020-05-06T06:17:37.997943+00:00 app[web.1]: at Object.<anonymous> (/app/server.js:18:33)
2020-05-06T06:17:37.997944+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1176:30)
2020-05-06T06:17:37.997945+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
2020-05-06T06:17:37.997946+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:1040:32)
2020-05-06T06:17:37.997946+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:929:14)
2020-05-06T06:17:37.997947+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
2020-05-06T06:17:37.997947+00:00 app[web.1]: at internal/main/run_main_module.js:17:47
2020-05-06T06:17:38.008593+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-05-06T06:17:38.009045+00:00 app[web.1]: npm ERR! errno 1
2020-05-06T06:17:38.010579+00:00 app[web.1]: npm ERR! nators@1.0.0 start: `node server.js`
2020-05-06T06:17:38.010801+00:00 app[web.1]: npm ERR! Exit status 1
2020-05-06T06:17:38.010998+00:00 app[web.1]: npm ERR!
2020-05-06T06:17:38.011165+00:00 app[web.1]: npm ERR! Failed at the nators@1.0.0 start script.
2020-05-06T06:17:38.011337+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-05-06T06:17:38.019349+00:00 app[web.1]:
2020-05-06T06:17:38.019585+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-05-06T06:17:38.019729+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2020-05-06T06_17_38_012Z-debug.log2020-05-06T06:17:38.124383+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-06T06:21:24.535375+00:00 app[api]: Release v11 created by user kshtjdutt07@gmail.com
2020-05-06T06:21:24.535375+00:00 app[api]: Set DATABASE config vars by user kshtjdutt07@gmail.com
2020-05-06T06:21:24.969184+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-06T06:21:53.118510+00:00 app[web.1]:
2020-05-06T06:21:53.118533+00:00 app[web.1]: > nators@1.0.0 start /app
2020-05-06T06:21:53.118533+00:00 app[web.1]: > node server.js
2020-05-06T06:21:53.118534+00:00 app[web.1]:
2020-05-06T06:21:53.787128+00:00 app[web.1]: DB Connection Successful
2020-05-06T06:21:54.930970+00:00 app[web.1]: (node:23) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
2020-05-06T06:21:54.931018+00:00 app[web.1]: (Use `node --trace-warnings ...` to show where the warning was
created)
2020-05-06T06:21:54.931393+00:00 app[web.1]: (node:23) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
2020-05-06T06:21:54.931535+00:00 app[web.1]: (node:23) Warning: Accessing non-existent property 'remove' of
module exports inside circular dependency
2020-05-06T06:21:54.931927+00:00 app[web.1]: (node:23) Warning: Accessing non-existent property 'updateOne'
of module exports inside circular dependency
2020-05-06T06:21:54.933101+00:00 app[web.1]: App running on port 3000....
2020-05-06T06:22:50.164718+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-06T06:24:43.507880+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-06T06:24:43.314434+00:00 app[api]: Set EMAIL_USERNAME config vars by user kshtjdutt07@gmail.com
2020-05-06T06:24:43.314434+00:00 app[api]: Release v12 created by user kshtjdutt07@gmail.com
2020-05-06T06:24:52.884115+00:00 app[web.1]:
2020-05-06T06:24:52.884133+00:00 app[web.1]: > nators@1.0.0 start /app
2020-05-06T06:24:52.884134+00:00 app[web.1]: > node server.js
2020-05-06T06:24:52.884134+00:00 app[web.1]:
2020-05-06T06:24:53.387205+00:00 app[web.1]: DB Connection Successful
2020-05-06T06:24:54.261131+00:00 app[web.1]: (node:23) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
2020-05-06T06:24:54.261156+00:00 app[web.1]: (Use `node --trace-warnings ...` to show where the warning was
created)
2020-05-06T06:24:54.261521+00:00 app[web.1]: (node:23) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
2020-05-06T06:24:54.261684+00:00 app[web.1]: (node:23) Warning: Accessing non-existent property 'remove' of
module exports inside circular dependency
2020-05-06T06:24:54.261789+00:00 app[web.1]: (node:23) Warning: Accessing non-existent property 'updateOne'
of module exports inside circular dependency
2020-05-06T06:24:54.262675+00:00 app[web.1]: App running on port 3000....
2020-05-06T06:25:51.472566+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-06T06:25:52.834198+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=natours-kshitij.herokuapp.com request_id=5e01b5e8-9533-4c93-b1c0-6a826d096299 fwd="115.97.197.82" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T06:25:55.069718+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=natours-kshitij.herokuapp.com request_id=d90e24a8-1e88-4bfb-b23f-811f611a2c3e fwd="115.97.197.82" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T06:28:55.240810+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-06T06:29:07.982770+00:00 app[web.1]:
2020-05-06T06:29:07.982796+00:00 app[web.1]: > nators@1.0.0 start /app
2020-05-06T06:29:07.982797+00:00 app[web.1]: > node server.js
2020-05-06T06:29:07.982797+00:00 app[web.1]:
2020-05-06T06:29:08.914046+00:00 app[web.1]: DB Connection Successful
2020-05-06T06:29:10.633169+00:00 app[web.1]: (node:23) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
2020-05-06T06:29:10.633180+00:00 app[web.1]: (Use `node --trace-warnings ...` to show where the warning was
created)
2020-05-06T06:29:10.633551+00:00 app[web.1]: (node:23) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
2020-05-06T06:29:10.633689+00:00 app[web.1]: (node:23) Warning: Accessing non-existent property 'remove' of
module exports inside circular dependency
2020-05-06T06:29:10.633800+00:00 app[web.1]: (node:23) Warning: Accessing non-existent property 'updateOne'
of module exports inside circular dependency
2020-05-06T06:29:10.635048+00:00 app[web.1]: App running on port 3000....

Пожалуйста, скажите мне, что мне делать сделать сейчас .... Он работал нормально, когда я пытался использовать свой собственный сервер для запуска с

Я уже сделал следующее -

  • Обновил git репозиторий
  • Изменил мой git репозиторий и снова обновил
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...