使用App Engine服务进行部署时出现502错误的网关

时间:2019-11-20 16:13:06

标签: javascript reactjs google-app-engine google-cloud-platform

我已经使用app engine service来将我的React应用程序部署到我曾经使用过create-react-app的地方。我按照以下步骤部署了应用程序

gcloud auth login gcloud config set project travelappfrontend gcloud app deploy

在此过程中,它没有显示任何错误,而是显示了成功消息。但是,当我打开它生成的URL时,它会花费很多时间并说502 bad gateway。我还需要考虑其他事项吗?

这是我的app.yaml

service: frontend-app
runtime: nodejs
env: flex
handlers:
  - url: /
    static_files: build/index.html
    upload: build/index.html
  - url: /
    static_dir: build

当我看到日志时,我只会得到与eslint相关的警告

这是详细的日志。我通过停止以前的版本再次创建了一个新的。我使用gcloud app logs read

生成的日志
2019-11-20 16:39:07 frontend-app[20191120t202725]    Line 7:23:  'PrivateRoute' is defined but never used  no-unused-vars
2019-11-20 16:39:07 frontend-app[20191120t202725]    Line 7:37:  'AdminRoute' is defined but never used    no-unused-vars
2019-11-20 16:39:07 frontend-app[20191120t202725]    Line 11:8:  'loadable' is defined but never used      no-unused-vars
2019-11-20 16:39:07 frontend-app[20191120t202725]
2019-11-20 16:39:07 frontend-app[20191120t202725]  ./src/components/Home/FootNote/index.js
2019-11-20 16:39:07 frontend-app[20191120t202725]    Line 7:8:   'theme' is defined but never used             no-unused-vars
2019-11-20 16:39:07 frontend-app[20191120t202725]    Line 53:3:  'Address' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:07 frontend-app[20191120t202725]
2019-11-20 16:39:07 frontend-app[20191120t202725]  ./src/components/Guides/List/List.js
2019-11-20 16:39:07 frontend-app[20191120t202725]    Line 90:3:  'Text' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:07 frontend-app[20191120t202725]
2019-11-20 16:39:07 frontend-app[20191120t202725]  Search for the keywords to learn more about each warning.
2019-11-20 16:39:07 frontend-app[20191120t202725]  To ignore, add // eslint-disable-next-line to the line before.
2019-11-20 16:39:07 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  Compiled with warnings.
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/commons/Sidebar/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 122:41:  Expected to return a value at the end of arrow function                                                                       array-callback-return
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 127:48:  Using target="_blank" without rel="noopener noreferrer" is a security risk: see https://mathiasbynens.github.io/rel-noopener  react/jsx-no-target-blank
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 151:34:  Expected to return a value at the end of arrow function                                                                       array-callback-return
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 156:44:  Using target="_blank" without rel="noopener noreferrer" is a security risk: see https://mathiasbynens.github.io/rel-noopener  react/jsx-no-target-blank
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Authentication/Login/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 13:10:  'isAdmin' is defined but never used                 no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 16:10:  'ResendDiv' is defined but never used               no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 22:19:  'changeMessage' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 23:11:  'refetchUser' is assigned a value but never used    no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Guides/Form/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 14:17:  'loading' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Guides/List/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 17:17:  'loading' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 17:26:  'refetch' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 102:7:  'Wrapper' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Authentication/ForgotPassword/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 17:19:  'changeMessage' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Admin/Guide/Create/Form.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 17:3:   'AutoSuggestion' is defined but never used              no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 29:3:   'SPECIALIZATION' is defined but never used              no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 41:5:   'getRootProps' is assigned a value but never used       no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 42:5:   'getInputProps' is assigned a value but never used      no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 43:5:   'isDragActive' is assigned a value but never used       no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 44:5:   'isDragAccept' is assigned a value but never used       no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 45:5:   'isDragReject' is assigned a value but never used       no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 236:3:  'DropzoneContainer' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 251:3:  'ThumbsContainer' is assigned a value but never used    no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 257:3:  'Thumb' is assigned a value but never used              no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 267:3:  'ThumbInner' is assigned a value but never used         no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 272:3:  'Image' is assigned a value but never used              no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Home/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 22:10:  'isOpen' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Guides/Detail/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 23:17:  'loading' is assigned a value but never used           no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 112:3:  'BannerHolder' is assigned a value but never used      no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 116:3:  'CoverImage' is assigned a value but never used        no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 122:3:  'Info' is assigned a value but never used              no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 132:3:  'OtherDetail' is assigned a value but never used       no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 138:3:  'GuideDetail' is assigned a value but never used       no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 148:3:  'GuideMetaInfo' is assigned a value but never used     no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 152:3:  'GuidePrice' is assigned a value but never used        no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 159:3:  'Brk' is assigned a value but never used               no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 166:3:  'Inclusion' is assigned a value but never used         no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 177:3:  'RequestGuidBtn' is assigned a value but never used    no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 180:3:  'Row' is assigned a value but never used               no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 191:3:  'ThreeCol' is assigned a value but never used          no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 203:3:  'WhiteCol' is assigned a value but never used          no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 209:3:  'VerifyList' is assigned a value but never used        no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 212:3:  'VerifyListItem' is assigned a value but never used    no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 219:3:  'VerfiedIcon' is assigned a value but never used       no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 224:3:  'NineColumn' is assigned a value but never used        no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 238:3:  'FlexCol' is assigned a value but never used           no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 242:3:  'FlexRow' is assigned a value but never used           no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 245:3:  'Key' is assigned a value but never used               no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 251:3:  'Value' is assigned a value but never used             no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 258:3:  'Headline' is assigned a value but never used          no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 267:3:  'ProfileChatLinks' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 270:3:  'ProfileChatLink' is assigned a value but never used   no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 274:3:  'UpcomingTable' is assigned a value but never used     no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 287:3:  'TrekRowHead' is assigned a value but never used       no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 294:3:  'TrekName' is assigned a value but never used          no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 304:3:  'TrekDays' is assigned a value but never used          no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/commons/Table/EditableField/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 23:37:  img elements must have an alt prop, either with meaningful text, or an empty string for decorative images  jsx-a11y/alt-text
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Admin/Guide/Create/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 25:17:  'loading' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Guides/Form/Form.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 25:3:  'SAFETY_TRAINING' is defined but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Authentication/ResetPassword/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 2:21:   'SubmissionError' is defined but never used    no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 9:10:   'splitToken' is defined but never used         no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 14:11:  'location' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Home/Listings/TopDestination/TopDestinationListing/destination-list.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 3:8:  'styled' is defined but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Authentication/Confirmation/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 40:3:  'SButton' is assigned a value but never used          no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 43:3:  'ConfirmationBtn' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 46:3:  'Wrapper' is assigned a value but never used          no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Home/Header/Search.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 55:1:  Block is redundant  no-lone-blocks
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Admin/Guide/List/List.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 57:17:  'loading' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Authentication/Signup/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 5:10:   'isEmpty' is defined but never used               no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 8:8:    'setSession' is defined but never used            no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 14:11:  'refetchUser' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/commons/Route/AdminRoute.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 6:10:  'isAdmin' is defined but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/App/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 7:23:  'PrivateRoute' is defined but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 7:37:  'AdminRoute' is defined but never used    no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 11:8:  'loadable' is defined but never used      no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Home/FootNote/index.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 7:8:   'theme' is defined but never used             no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 53:3:  'Address' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  ./src/components/Guides/List/List.js
2019-11-20 16:39:51 frontend-app[20191120t202725]    Line 90:3:  'Text' is assigned a value but never used  no-unused-vars
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:39:51 frontend-app[20191120t202725]  Search for the keywords to learn more about each warning.
2019-11-20 16:39:51 frontend-app[20191120t202725]  To ignore, add // eslint-disable-next-line to the line before.
2019-11-20 16:39:51 frontend-app[20191120t202725]
2019-11-20 16:50:41 frontend-app[20191120t222924]
2019-11-20 16:50:41 frontend-app[20191120t222924]  > nodetravel@0.1.0 start /app
2019-11-20 16:50:41 frontend-app[20191120t222924]  > react-scripts start
2019-11-20 16:50:41 frontend-app[20191120t222924]
2019-11-20 16:50:47 frontend-app[20191120t222924]
2019-11-20 16:50:47 frontend-app[20191120t222924]  > nodetravel@0.1.0 start /app
2019-11-20 16:50:47 frontend-app[20191120t222924]  > react-scripts start
2019-11-20 16:50:47 frontend-app[20191120t222924]
2019-11-20 16:51:07 frontend-app[20191120t222924]  Starting the development server...
2019-11-20 16:51:07 frontend-app[20191120t222924]
2019-11-20 16:51:12 frontend-app[20191120t222924]  Starting the development server...
2019-11-20 16:51:12 frontend-app[20191120t222924]
2019-11-20 16:53:57 frontend-app[20191120t222924]
2019-11-20 16:53:57 frontend-app[20191120t222924]  > nodetravel@0.1.0 start /app
2019-11-20 16:53:57 frontend-app[20191120t222924]  > react-scripts start
2019-11-20 16:53:57 frontend-app[20191120t222924]
2019-11-20 16:54:23 frontend-app[20191120t222924]  Starting the development server...
2019-11-20 16:54:23 frontend-app[20191120t222924]
2019-11-20 17:00:40 frontend-app[20191120t222924]
2019-11-20 17:00:40 frontend-app[20191120t222924]  > nodetravel@0.1.0 start /app
2019-11-20 17:00:40 frontend-app[20191120t222924]  > react-scripts start
2019-11-20 17:00:40 frontend-app[20191120t222924]
2019-11-20 17:00:49 default[20191119t221618]  "GET /" 404
2019-11-20 17:01:06 frontend-app[20191120t222924]  Starting the development server...
2019-11-20 17:01:06 frontend-app[20191120t222924]
2019-11-20 17:03:47 frontend-app[20191120t222924]  "GET /" 502
2019-11-20 17:06:08 frontend-app[20191120t222924]  "GET /favicon.ico" 502
2019-11-20 17:10:39 frontend-app[20191120t222924]  The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
2019-11-20 17:10:41 frontend-app[20191120t222924]  npm ERR! code ELIFECYCLE
2019-11-20 17:10:41 frontend-app[20191120t222924]  npm ERR! errno 1
2019-11-20 17:10:41 frontend-app[20191120t222924]  npm ERR! nodetravel@0.1.0 start: `react-scripts start`
2019-11-20 17:10:41 frontend-app[20191120t222924]  npm ERR! Exit status 1
2019-11-20 17:10:41 frontend-app[20191120t222924]  npm ERR!
2019-11-20 17:10:41 frontend-app[20191120t222924]  npm ERR! Failed at the nodetravel@0.1.0 start script.
2019-11-20 17:10:41 frontend-app[20191120t222924]  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-11-20 17:10:41 frontend-app[20191120t222924]
2019-11-20 17:10:41 frontend-app[20191120t222924]  npm ERR! A complete log of this run can be found in:
2019-11-20 17:10:41 frontend-app[20191120t222924]  npm ERR!     /root/.npm/_logs/2019-11-20T17_10_41_727Z-debug.log
2019-11-20 17:10:48 frontend-app[20191120t222924]
2019-11-20 17:10:48 frontend-app[20191120t222924]  > nodetravel@0.1.0 start /app
2019-11-20 17:10:48 frontend-app[20191120t222924]  > react-scripts start
2019-11-20 17:10:48 frontend-app[20191120t222924]
2019-11-20 17:11:26 frontend-app[20191120t222924]  Starting the development server...
2019-11-20 17:11:26 frontend-app[20191120t222924]
2019-11-20 17:13:50 frontend-app[20191120t222924]
2019-11-20 17:13:50 frontend-app[20191120t222924]  > nodetravel@0.1.0 start /app
2019-11-20 17:13:50 frontend-app[20191120t222924]  > react-scripts start
2019-11-20 17:13:50 frontend-app[20191120t222924]
2019-11-20 17:14:09 frontend-app[20191120t222924]
2019-11-20 17:14:09 frontend-app[20191120t222924]  > nodetravel@0.1.0 start /app
2019-11-20 17:14:09 frontend-app[20191120t222924]  > react-scripts start
2019-11-20 17:14:09 frontend-app[20191120t222924]
2019-11-20 17:14:16 frontend-app[20191120t222924]  Starting the development server...
2019-11-20 17:14:16 frontend-app[20191120t222924]
2019-11-20 17:14:27 frontend-app[20191120t222924]
2019-11-20 17:14:27 frontend-app[20191120t222924]  > nodetravel@0.1.0 start /app
2019-11-20 17:14:27 frontend-app[20191120t222924]  > react-scripts start
2019-11-20 17:14:27 frontend-app[20191120t222924]
2019-11-20 17:14:33 frontend-app[20191120t222924]  Starting the development server...
2019-11-20 17:14:33 frontend-app[20191120t222924]
2019-11-20 17:14:51 frontend-app[20191120t222924]  Starting the development server...
2019-11-20 17:14:51 frontend-app[20191120t222924]

0 个答案:

没有答案