Приложение приложения Heroku не удалось найти путь - PullRequest
0 голосов
/ 02 мая 2020

Я впервые пытаюсь использовать Heroku, мое приложение работает нормально на локальной машине, и оно успешно собирается на Heroku, но когда я пытаюсь открыть его, я получаю следующие ошибки, полные журналы в конце

2020-05-02T16:35:34.660563+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-02T16:35:42.610766+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=warm-tundra-79939.herokuapp.com request_id=d3ccbec7-c4a3-4805-8df5-ea8f39b82001 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-02T16:35:43.084078+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=warm-tundra-79939.herokuapp.com request_id=09e01082-777c-4b95-a556-c2b85d9fe192 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https

вот индекс. html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />

    <meta name="viewport" content="width=device-width, initial-scale=1" />




<meta property="og:image" content="http://euro-travel-example.com/thumbnail.jpg">
<meta property="og:url" content="http://euro-travel-example.com/index.htm">

 
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

    <title>testapp</title>
  </head>
  <body>
   
    <div id="root"></div>

    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" 
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" 
crossorigin="anonymous"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" 
integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" 
crossorigin="anonymous"></script>

<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" 
integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm" 
crossorigin="anonymous"></script>
  </body>
</html>

2020-05-05T18:49:55.957210+00:00 app[web.1]: 
2020-05-05T18:49:57.832175+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Project is running at http://172.16.247.6/
2020-05-05T18:49:57.832502+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: webpack output is served from
2020-05-05T18:49:57.832579+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Content not from webpack is served from /app/public
2020-05-05T18:49:57.832647+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: 404s will fallback to /
2020-05-05T18:49:57.832827+00:00 app[web.1]: Starting the development server...
2020-05-05T18:49:57.832827+00:00 app[web.1]: 
2020-05-05T18:49:57.930367+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-06T00:26:51.023260+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=warm-tundra-79939.herokuapp.com request_id=cc1a766f-6f8e-4c9d-a905-4db2c5a35123 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:26:51.707295+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=warm-tundra-79939.herokuapp.com request_id=71e0907a-cab5-460a-baae-a8f18a4c6e3c fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:27:53.993935+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=warm-tundra-79939.herokuapp.com request_id=3f8f5a51-3f4c-4772-bfd2-def72ff6ba3d fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:27:54.533509+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=warm-tundra-79939.herokuapp.com request_id=17c0e361-a681-4a1b-8b91-2b11d27b0889 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:28:40.343274+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=warm-tundra-79939.herokuapp.com request_id=67c5ba4b-cc2a-4bf7-a541-bc85fb5368a7 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:28:40.883375+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=warm-tundra-79939.herokuapp.com request_id=e571e97a-b05a-431c-8977-515877b46794 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:29:25.465162+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=warm-tundra-79939.herokuapp.com request_id=76f11081-66aa-497b-8e36-edf91db8e5af fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:29:26.011122+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=warm-tundra-79939.herokuapp.com request_id=8c0ae3f4-bd5a-4b4b-b35c-0d23a62eb904 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:29:29.518382+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=warm-tundra-79939.herokuapp.com request_id=bd11cc44-8174-4668-8a39-e9ad79bd13ed fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:29:29.978317+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=warm-tundra-79939.herokuapp.com request_id=317f7164-c003-4ea8-bd6d-bda85b7379d3 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:29:54.655340+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=warm-tundra-79939.herokuapp.com request_id=57bd99b4-b000-4553-acaf-8d73266b3cc9 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:29:55.215061+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=warm-tundra-79939.herokuapp.com request_id=a2d42c76-35b8-42fa-885f-de122556b825 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:30:17.301612+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=warm-tundra-79939.herokuapp.com request_id=59438701-a1a8-4ce9-901a-ad7026be07a4 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:30:17.853183+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=warm-tundra-79939.herokuapp.com request_id=712a931c-60ec-41c0-a1f6-02885e046ec1 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:30:53.000000+00:00 app[api]: Build started by user  
2020-05-06T00:32:07.210573+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-06T00:32:06.828499+00:00 app[api]: Deploy 4df36638 by user  
2020-05-06T00:32:06.828499+00:00 app[api]: Release v12 created by user  
2020-05-06T00:32:14.000000+00:00 app[api]: Build succeeded
2020-05-06T00:32:21.473845+00:00 app[web.1]: 
2020-05-06T00:32:21.473861+00:00 app[web.1]: > opentable@0.1.0 start /app
2020-05-06T00:32:21.473861+00:00 app[web.1]: > react-scripts start
2020-05-06T00:32:21.473862+00:00 app[web.1]: 
2020-05-06T00:32:25.753013+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Project is running at http://172.18.92.170/
2020-05-06T00:32:25.753629+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: webpack output is served from
2020-05-06T00:32:25.753777+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Content not from webpack is served from /app/public
2020-05-06T00:32:25.753895+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: 404s will fallback to /
2020-05-06T00:32:25.754229+00:00 app[web.1]: Starting the development server...
2020-05-06T00:32:25.754230+00:00 app[web.1]: 
2020-05-06T00:32:25.881428+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-06T00:32:25.884338+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-06T00:32:37.154954+00:00 app[web.1]: 
2020-05-06T00:32:37.154971+00:00 app[web.1]: > opentable@0.1.0 start /app
2020-05-06T00:32:37.154971+00:00 app[web.1]: > react-scripts start
2020-05-06T00:32:37.154972+00:00 app[web.1]: 
2020-05-06T00:32:39.227810+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Project is running at http://172.18.49.162/
2020-05-06T00:32:39.228215+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: webpack output is served from
2020-05-06T00:32:39.228315+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Content not from webpack is served from /app/public
2020-05-06T00:32:39.228403+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: 404s will fallback to /
2020-05-06T00:32:39.228613+00:00 app[web.1]: Starting the development server...
2020-05-06T00:32:39.228615+00:00 app[web.1]: 
2020-05-06T00:32:39.350859+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-06T00:32:40.270514+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=warm-tundra-79939.herokuapp.com request_id=9eb7556b-8477-448a-b054-f21bbcd43734 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:32:41.800494+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=warm-tundra-79939.herokuapp.com request_id=1f677ae6-ba9b-4141-9077-cca446acb53b fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:36:38.633976+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=warm-tundra-79939.herokuapp.com request_id=c8267a8d-40a4-4e85-8917-fd2cbcdb5e26 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:36:39.245883+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=warm-tundra-79939.herokuapp.com request_id=f3d5af60-fcf2-4ffa-935e-731525f167a0 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:45:33.000000+00:00 app[api]: Build started by user  
2020-05-06T00:46:05.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/333fe337-28b4-4897-aea2-b6e00e21658c/activity/builds/353cebff-768b-4690-b319-cfd691354e65
2020-05-06T00:49:46.000000+00:00 app[api]: Build started by user  
2020-05-06T00:51:00.406504+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-06T00:51:00.150835+00:00 app[api]: Deploy e761a226 by user  
2020-05-06T00:51:00.150835+00:00 app[api]: Release v13 created by user  
2020-05-06T00:51:07.000000+00:00 app[api]: Build succeeded
2020-05-06T00:51:10.690011+00:00 app[web.1]: 
2020-05-06T00:51:10.690025+00:00 app[web.1]: > opentable@0.1.0 start /app
2020-05-06T00:51:10.690026+00:00 app[web.1]: > react-scripts start
2020-05-06T00:51:10.690026+00:00 app[web.1]: 
2020-05-06T00:51:12.685464+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Project is running at http://172.16.128.62/
2020-05-06T00:51:12.685820+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: webpack output is served from
2020-05-06T00:51:12.685898+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Content not from webpack is served from /app/public
2020-05-06T00:51:12.685967+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: 404s will fallback to /
2020-05-06T00:51:12.686185+00:00 app[web.1]: Starting the development server...
2020-05-06T00:51:12.686188+00:00 app[web.1]: 
2020-05-06T00:51:12.787345+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-06T00:51:12.790433+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-06T00:51:29.195595+00:00 app[web.1]: 
2020-05-06T00:51:29.195636+00:00 app[web.1]: > opentable@0.1.0 start /app
2020-05-06T00:51:29.195636+00:00 app[web.1]: > react-scripts start
2020-05-06T00:51:29.195637+00:00 app[web.1]: 
2020-05-06T00:51:34.480135+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Project is running at http://172.19.76.182/
2020-05-06T00:51:34.480852+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: webpack output is served from
2020-05-06T00:51:34.481791+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Content not from webpack is served from /app/public
2020-05-06T00:51:34.481944+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: 404s will fallback to /
2020-05-06T00:51:34.482310+00:00 app[web.1]: Starting the development server...
2020-05-06T00:51:34.482311+00:00 app[web.1]: 
2020-05-06T00:51:34.653916+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-06T00:51:49.687511+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=warm-tundra-79939.herokuapp.com request_id=644090fa-2282-43eb-b6a0-3f586a877b2b fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:51:50.279212+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=warm-tundra-79939.herokuapp.com request_id=41875779-e718-4c21-9cd0-a27b994ce5ff fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:52:45.417633+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-06T00:52:57.867537+00:00 app[web.1]: 
2020-05-06T00:52:57.867556+00:00 app[web.1]: > opentable@0.1.0 start /app
2020-05-06T00:52:57.867556+00:00 app[web.1]: > react-scripts start
2020-05-06T00:52:57.867556+00:00 app[web.1]: 
2020-05-06T00:52:59.557333+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Project is running at http://172.17.90.18/
2020-05-06T00:52:59.557673+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: webpack output is served from
2020-05-06T00:52:59.557747+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Content not from webpack is served from /app/public
2020-05-06T00:52:59.557810+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: 404s will fallback to /
2020-05-06T00:52:59.557987+00:00 app[web.1]: Starting the development server...
2020-05-06T00:52:59.557987+00:00 app[web.1]: 
2020-05-06T00:52:59.658416+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-06T00:53:42.008093+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=warm-tundra-79939.herokuapp.com request_id=92745996-d95d-4da8-a4f1-686fcb5c63be fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https
2020-05-06T00:53:42.611511+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=warm-tundra-79939.herokuapp.com request_id=bf1eafd8-3211-4027-91a6-85bb996b9038 fwd="72.137.75.96" dyno= connect= service= status=503 bytes= protocol=https

Раньше у меня был favicon, но он был удален, а новый git был выдвинут, но все еще получала ошибку

1 Ответ

0 голосов
/ 10 мая 2020

Я исправил проблему, так как это было мое самое первое приложение в nodejs Я не знал, что мне нужен сервер.

const express = require('express');
const favicon = require('express-favicon');
const path = require('path');
const port = process.env.PORT || 9999;
const app = express();
app.use(favicon(__dirname + '/build/favicon.ico'));

app.use(express.static(__dirname));
app.use(express.static(path.join(__dirname, 'build')));
app.get('/ping', function (req, res) {
 return res.send('pong');
});
app.get('/*', function (req, res) {
  res.sendFile(path.join(__dirname, 'build', 'index.html'));
});
app.listen(port);
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...