2

我使用了 saleor 平台方法,带有 docker 和仪表板,其他一切正常,但不是前端,知道如何调试它,这是最后一个命令的输出

storefront_1  | > saleor-site@2.11.0 start /app
storefront_1  | > cross-env NODE_ENV=develop webpack-dev-server --history-api-fallback --watch --port 3000 --mode development --hotOnly "--hostname" "0.0.0.0"
storefront_1  |
storefront_1  | Starting type checking service...
storefront_1  | Using 1 worker with 2048MB memory limit
storefront_1  | ℹ 「wds」: Project is running at http://localhost:3000/
storefront_1  | ℹ 「wds」: webpack output is served from /
storefront_1  | ℹ 「wds」: Content not from webpack is served from /app
storefront_1  | ℹ 「wds」: 404s will fallback to /index.html
storefront_1  | Browserslist: caniuse-lite is outdated. Please run next command `npm update`
mailhog_1     | [APIv1] KEEPALIVE /api/v1/events
storefront_1  | Type checking in progress...
storefront_1  | ℹ 「wdm」: Compiled with warnings.
storefront_1  | ⚠ 「wdm」: Hash: 8bbc7119559a66ddb40a
storefront_1  | Version: webpack 4.42.1
storefront_1  | Time: 65254ms
storefront_1  | Built at: 05/29/2021 11:15:57 AM
storefront_1  |                                                   Asset       Size  Chunks                   Chunk Names
storefront_1  |                                         images/amex.svg   3.81 KiB          [emitted]
storefront_1  |                                   images/arrow-back.svg  404 bytes          [emitted]
storefront_1  |                                        images/arrow.svg  127 bytes          [emitted]
storefront_1  |                            images/breadcrumbs-arrow.svg  198 bytes          [emitted]
storefront_1  |                               images/carousel-arrow.svg  223 bytes          [emitted]
storefront_1  |                                         images/cart.svg    1.3 KiB          [emitted]
storefront_1  |                                     images/discover.svg   1.77 KiB          [emitted]
storefront_1  |                                images/facebook-icon.svg  369 bytes          [emitted]
storefront_1  |              images/favicons/android-chrome-144x144.png   4.16 KiB          [emitted]
storefront_1  |              images/favicons/android-chrome-192x192.png   5.62 KiB          [emitted]
storefront_1  |              images/favicons/android-chrome-256x256.png   7.54 KiB          [emitted]
storefront_1  |                images/favicons/android-chrome-36x36.png   1.03 KiB          [emitted]
storefront_1  |              images/favicons/android-chrome-384x384.png   13.4 KiB          [emitted]
storefront_1  |                images/favicons/android-chrome-48x48.png   1.33 KiB          [emitted]
storefront_1  |              images/favicons/android-chrome-512x512.png   19.5 KiB          [emitted]
storefront_1  |                images/favicons/android-chrome-72x72.png   1.99 KiB          [emitted]
storefront_1  |                images/favicons/android-chrome-96x96.png    2.7 KiB          [emitted]
storefront_1  |          images/favicons/apple-touch-icon-1024x1024.png   57.9 KiB          [emitted]
storefront_1  |            images/favicons/apple-touch-icon-114x114.png   3.19 KiB          [emitted]
storefront_1  |            images/favicons/apple-touch-icon-120x120.png   3.35 KiB          [emitted]
storefront_1  |            images/favicons/apple-touch-icon-144x144.png   4.14 KiB          [emitted]
storefront_1  |            images/favicons/apple-touch-icon-152x152.png   4.41 KiB          [emitted]
storefront_1  |            images/favicons/apple-touch-icon-167x167.png   4.85 KiB          [emitted]
storefront_1  |            images/favicons/apple-touch-icon-180x180.png   5.31 KiB          [emitted]
storefront_1  |              images/favicons/apple-touch-icon-57x57.png    1.6 KiB          [emitted]
storefront_1  |              images/favicons/apple-touch-icon-60x60.png   1.67 KiB          [emitted]
storefront_1  |              images/favicons/apple-touch-icon-72x72.png   1.99 KiB          [emitted]
storefront_1  |              images/favicons/apple-touch-icon-76x76.png   2.14 KiB          [emitted]
storefront_1  |        images/favicons/apple-touch-icon-precomposed.png   5.31 KiB          [emitted]
storefront_1  |                    images/favicons/apple-touch-icon.png   5.31 KiB          [emitted]
storefront_1  | images/favicons/apple-touch-startup-image-1182x2208.png     49 KiB          [emitted]
storefront_1  | images/favicons/apple-touch-startup-image-1242x2148.png   85.9 KiB          [emitted]
storefront_1  | images/favicons/apple-touch-startup-image-1496x2048.png   95.4 KiB          [emitted]
storefront_1  | images/favicons/apple-touch-startup-image-1536x2008.png    114 KiB          [emitted]
storefront_1  |   images/favicons/apple-touch-startup-image-320x460.png   11.3 KiB          [emitted]
storefront_1  |  images/favicons/apple-touch-startup-image-640x1096.png   30.7 KiB          [emitted]
storefront_1  |   images/favicons/apple-touch-startup-image-640x920.png   29.7 KiB          [emitted]
storefront_1  |  images/favicons/apple-touch-startup-image-748x1024.png   32.2 KiB          [emitted]
storefront_1  |  images/favicons/apple-touch-startup-image-750x1294.png   38.9 KiB          [emitted]
storefront_1  |  images/favicons/apple-touch-startup-image-768x1004.png   38.3 KiB          [emitted]
storefront_1  |                       images/favicons/browserconfig.xml  481 bytes          [emitted]
storefront_1  |                       images/favicons/coast-228x228.png   6.99 KiB          [emitted]
storefront_1  |                       images/favicons/favicon-16x16.png  481 bytes          [emitted]
storefront_1  |                       images/favicons/favicon-32x32.png  910 bytes          [emitted]
storefront_1  |                             images/favicons/favicon.ico   32.5 KiB          [emitted]
storefront_1  |                 images/favicons/firefox_app_128x128.png   3.88 KiB          [emitted]
storefront_1  |                 images/favicons/firefox_app_512x512.png     22 KiB          [emitted]
storefront_1  |                   images/favicons/firefox_app_60x60.png   1.84 KiB          [emitted]
storefront_1  |                           images/favicons/manifest.json   1.38 KiB          [emitted]
storefront_1  |                         images/favicons/manifest.webapp  351 bytes          [emitted]
storefront_1  |                      images/favicons/mstile-144x144.png   4.16 KiB          [emitted]
storefront_1  |                      images/favicons/mstile-150x150.png   8.69 KiB          [emitted]
storefront_1  |                      images/favicons/mstile-310x150.png   9.44 KiB          [emitted]
storefront_1  |                      images/favicons/mstile-310x310.png   22.4 KiB          [emitted]
storefront_1  |                        images/favicons/mstile-70x70.png   3.51 KiB          [emitted]
storefront_1  |                images/favicons/yandex-browser-50x50.png   1.38 KiB          [emitted]
storefront_1  |            images/favicons/yandex-browser-manifest.json  165 bytes          [emitted]
storefront_1  |                                      images/garbage.svg  914 bytes          [emitted]
storefront_1  |                              images/hamburger-hover.svg  360 bytes          [emitted]
storefront_1  |                                    images/hamburger.svg  252 bytes          [emitted]
storefront_1  |                               images/instagram-icon.svg  879 bytes          [emitted]
storefront_1  |                                          images/jcb.svg   1.74 KiB          [emitted]
storefront_1  |                                   images/logo-small.svg  824 bytes          [emitted]
storefront_1  |                                         images/logo.svg   2.12 KiB          [emitted]
storefront_1  |                                      images/maestro.svg  413 bytes          [emitted]
storefront_1  |                                   images/mastercard.svg  413 bytes          [emitted]
storefront_1  |                                     images/no-photo.svg   5.19 KiB          [emitted]
storefront_1  |                                   images/quote-icon.svg  380 bytes          [emitted]
storefront_1  |                                       images/search.svg  704 bytes          [emitted]
storefront_1  |                                images/subcategories.svg  128 bytes          [emitted]
storefront_1  |                                 images/twitter-icon.svg  696 bytes          [emitted]
storefront_1  |                                         images/user.svg   1.85 KiB          [emitted]
storefront_1  |                                         images/visa.svg   1.17 KiB          [emitted]
storefront_1  |                                            images/x.svg  289 bytes          [emitted]
storefront_1  |                                 images/youtube-icon.svg  637 bytes          [emitted]
storefront_1  |                                              index.html   4.75 KiB          [emitted]
storefront_1  |                                               js/app.js   9.25 MiB     app  [emitted]        app
storefront_1  |                                           js/app.js.map    8.4 MiB     app  [emitted] [dev]  app
storefront_1  | Entrypoint app = js/app.js js/app.js.map
storefront_1  | [0] multi (webpack)-dev-server/client?http://localhost:3000 (webpack)/hot/only-dev-server.js ./src/index.tsx 52 bytes {app} [built]
storefront_1  | [./node_modules/@babel/runtime/helpers/asyncToGenerator.js] 809 bytes {app} [built]
storefront_1  | [./node_modules/@babel/runtime/helpers/extends.js] 427 bytes {app} [built]
storefront_1  | [./node_modules/@babel/runtime/regenerator/index.js] 49 bytes {app} [built]
storefront_1  | [./node_modules/@hot-loader/react-dom/index.js] 1.33 KiB {app} [built]
storefront_1  | [./node_modules/@saleor/sdk/lib/index.js] 5.2 KiB {app} [built]
storefront_1  | [./node_modules/@sentry/apm/esm/index.js] 325 bytes {app} [built]
storefront_1  | [./node_modules/@sentry/browser/esm/index.js] 793 bytes {app} [built]
storefront_1  | [./node_modules/react-alert/dist/esm/react-alert.js] 12.3 KiB {app} [built]
storefront_1  | [./node_modules/react-gtm-module/dist/index.js] 251 bytes {app} [built]
storefront_1  | [./node_modules/react-hot-loader/index.js] 1.24 KiB {app} [built]
storefront_1  | [./node_modules/react-router-dom/esm/react-router-dom.js] 9.76 KiB {app} [built]
storefront_1  | [./node_modules/webpack-dev-server/client/index.js?http://localhost:3000] (webpack)-dev-server/client?http://localhost:3000 4.29 KiB {app} [built]
storefront_1  | [./node_modules/webpack/hot/only-dev-server.js] (webpack)/hot/only-dev-server.js 2.52 KiB {app} [built]
storefront_1  | [./src/index.tsx] 4.38 KiB {app} [built]
storefront_1  |     + 1485 hidden modules
storefront_1  |
storefront_1  | WARNING in EnvironmentPlugin - GTM_ID environment variable is undefined.
storefront_1  |
storefront_1  | You can pass an object with default values to suppress this warning.
storefront_1  | See https://webpack.js.org/plugins/environment-plugin for example.
storefront_1  | Child html-webpack-plugin for "index.html":
storefront_1  |      1 asset
storefront_1  |     Entrypoint undefined = index.html
storefront_1  |     [./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html] 866 bytes {0} [built]
storefront_1  |     [./node_modules/lodash/lodash.js] 530 KiB {0} [built]
storefront_1  |     [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {0} [built]
storefront_1  |     [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
storefront_1  | Child webapp-webpack-plugin:
storefront_1  |      1 asset
storefront_1  |     Entrypoint favicon.png = b69c9faae52434d05cae
storefront_1  |     [./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"/app/node_modules/.cache/webapp-webpack-plugin"}!./node_modules/webapp-webpack-plugin/src/loader.js?{"prefix":"images/favicons/","options":{"appDescription":"Storefront for the Saleor e-commerce platform","appName":"Saleor","background":"#ddd","developerURL":null,"display":"standalone","theme_color":"#333","version":"2.11.0","developerName":"Mirumee"},"path":"/"}!./src/images/favicon.png] 1.06 MiB {favicon.png} [built]
api_1         | [29/May/2021 11:16:00] "OPTIONS /graphql/ HTTP/1.1" 200 0
api_1         | [29/May/2021 11:16:00] "POST /graphql/ HTTP/1.1" 200 1350
api_1         | [29/May/2021 11:16:14] "OPTIONS /graphql/ HTTP/1.1" 200 0
api_1         | [29/May/2021 11:16:14] "POST /graphql/ HTTP/1.1" 200 1350
mailhog_1     | [APIv1] KEEPALIVE /api/v1/events
api_1         | [29/May/2021 11:16:39] "OPTIONS /graphql/ HTTP/1.1" 200 0
api_1         | [29/May/2021 11:16:39] "POST /graphql/ HTTP/1.1" 200 477
api_1         | [29/May/2021 11:16:49] "OPTIONS /graphql/ HTTP/1.1" 200 0
api_1         | [29/May/2021 11:16:49] "POST /graphql/ HTTP/1.1" 200 2543
api_1         | [29/May/2021 11:17:23] "OPTIONS /graphql/ HTTP/1.1" 200 0
api_1         | [29/May/2021 11:17:23] "POST /graphql/ HTTP/1.1" 200 87
mailhog_1     | [APIv1] KEEPALIVE /api/v1/events
api_1         | [29/May/2021 11:18:18] "OPTIONS /graphql/ HTTP/1.1" 200 0
api_1         | [29/May/2021 11:18:19] "POST /graphql/ HTTP/1.1" 200 35562
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_fd_juice_06_hb65yCt-thumbnail-255x255.png HTTP/1.1" 200 7686
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_fd_juice_01-thumbnail-255x255.png HTTP/1.1" 200 7798
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleor-digital-03_4-thumbnail-255x255.png HTTP/1.1" 200 13601
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_fd_juice_02_PZyWi7S-thumbnail-255x255.png HTTP/1.1" 200 7085
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_cl_bogo02_1-thumbnail-255x255.png HTTP/1.1" 200 13127
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_fd_juice_02-thumbnail-255x255.png HTTP/1.1" 200 7085
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_fd_juice_05-thumbnail-255x255.png HTTP/1.1" 200 8576
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_cl_boot07_1-thumbnail-255x255.png HTTP/1.1" 200 10543
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_fd_juice_04-thumbnail-255x255.png HTTP/1.1" 200 7448
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_cuschion01-thumbnail-255x255.png HTTP/1.1" 200 14283
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleor-digital-03_5-thumbnail-255x255.png HTTP/1.1" 200 15558
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_paints_05-thumbnail-255x255.png HTTP/1.1" 200 9779
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_paints_04-thumbnail-255x255.png HTTP/1.1" 200 10111
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleor-digital-03_2-thumbnail-255x255.png HTTP/1.1" 200 13974
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_cl_bogo03_1-thumbnail-255x255.png HTTP/1.1" 200 14276
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_paints_01-thumbnail-255x255.png HTTP/1.1" 200 9157
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_fd_juice_06-thumbnail-255x255.png HTTP/1.1" 200 7686
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleor-digital-03_3-thumbnail-255x255.png HTTP/1.1" 200 14931
api_1         | [29/May/2021 11:18:20] "GET /media/__sized__/products/saleordemoproduct_fd_juice_03-thumbnail-255x255.png HTTP/1.1" 200 7511
api_1         | [29/May/2021 11:18:22] "POST /graphql/ HTTP/1.1" 200 9847
mailhog_1     | [APIv1] KEEPALIVE /api/v1/events
api_1         | [29/May/2021 11:18:28] "OPTIONS /graphql/ HTTP/1.1" 200 0
api_1         | [29/May/2021 11:18:29] "POST /graphql/ HTTP/1.1" 200 35562
api_1         | [29/May/2021 11:18:30] "POST /graphql/ HTTP/1.1" 200 12422
api_1         | [29/May/2021 11:18:30] "GET /media/products/saleordemoproduct_fd_juice_06_hb65yCt.png HTTP/1.1" 200 69727
api_1         | [29/May/2021 11:18:32] "POST /graphql/ HTTP/1.1" 200 341
storefront_1  | No type errors found
storefront_1  | Version: typescript 3.8.2, eslint 7.2.0
storefront_1  | Time: 256520ms
4

1 回答 1

5

我面临着类似的问题。在 docker-compose.yml 文件中更新店面的构建命令修复了它。

将“--hostname”参数名称更改为仪表板中使用的“--host”。

前:

storefront:
    build:
      context: ./saleor-storefront
      dockerfile: ./Dockerfile.dev
    ports:
      - 3000:3000
    restart: unless-stopped
    volumes:
      - ./saleor-storefront/:/app:cached
      - /app/node_modules/
    command: npm start -- --hostname 0.0.0.0

后:

storefront:
    build:
      context: ./saleor-storefront
      dockerfile: ./Dockerfile.dev
    ports:
      - 3000:3000
    restart: unless-stopped
    volumes:
      - ./saleor-storefront/:/app:cached
      - /app/node_modules/
    command: npm start -- --host 0.0.0.0
于 2021-06-01T19:45:51.220 回答