Netlify 构建通过但仅显示 html css

Netlify build passed but shows only html css

我需要有关 netlify 部署的帮助。实际上它部署并显示 "Published" 但我尝试了 Gatsby 构建并且与失败或任何 netlify 失败部署无关但是一旦它在 Live 中发布然后它只显示 html 和 css。 导航栏菜单和下拉菜单不起作用。但是在本地主机上,它显示了一切。
我不明白为什么部署 Netlify 后网站看起来不像我本地的网站。

开发控制台显示这些警告:
-React-Hot-Loader: react--dom patch is not detected. React 16.6+ features may not work.
-You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.
-Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html for details.

我尝试了什么:
-Check old commits.
-Check public folder in local apache server.
-Clear gatsby cache, netlify cache and redeploy.

如果你有任何想法,我想测试一下,但没有任何效果
这是盖茨比日志:

gatsby build

success open and validate gatsby-configs - 0.111s
success load plugins - 1.952s
success onPreInit - 0.034s
success delete html and css files from previous builds - 0.049s
success initialize cache - 0.009s
success copy gatsby files - 0.113s
success onPreBootstrap - 0.015s
success createSchemaCustomization - 0.008s
 -> wordpress__wp_v2 fetched : 1
 -> wordpress__wp_example.wordpress.com fetched : 1

Path: /wp/v2/sites/example.wordpress.com/jetpack-global-styles?per_page=100&page=1
The server response was "403 Forbidden"
Inner exception message: "Sorry, you are not allowed to do that."
 -> wordpress__POST fetched : 59
 -> wordpress__PAGE fetched : 2
 -> wordpress__wp_media fetched : 90
 -> wordpress__wp_blocks fetched : 1
 -> wordpress__wp_feedback fetched : 0
 -> wordpress__wp_jp_pay_order fetched : 0
 -> wordpress__wp_jp_pay_product fetched : 0
 -> wordpress__wp_block_areas fetched : 0
 -> wordpress__wp_types fetched : 1
 -> wordpress__wp_statuses fetched : 1
 -> wordpress__wp_taxonomies fetched : 1
 -> wordpress__CATEGORY fetched : 13
 -> wordpress__TAG fetched : 7
 -> wordpress__wp_users fetched : 2
 -> wordpress__wp_me fetched : 1
 -> wordpress__wp_comments fetched : 0
 -> wordpress__wp_search fetched : 61
 -> wordpress__wp_settings fetched : 1

Path: /wp/v2/sites/example.wordpress.com/themes?per_page=100&page=1
The server response was "400 Bad Request"
Inner exception message: "Missing parameter(s): status"
success source and transform nodes - 15.832s
warn Multiple node fields resolve to the same GraphQL field `wordpress__wp_media.guid` - [`guid`, `guid___NODE`].
warn Multiple node fields resolve to the same GraphQL field `wordpress__POST.jetpack_featured_media_url` -
success building schema - 1.044s
success createPages - 0.149s
warn Non-deterministic routing danger: Attempting to create page: "/contact/", but page "/contact" already exists
This could lead to non-deterministic routing behavior
success createPagesStatefully - 0.244s
success onPreExtractQueries - 0.003s
success update schema - 0.055s
success extract queries from components - 0.755s
success write out requires - 0.010s
success write out redirect data - 0.005s
success Build manifest and related icons - 0.168s
success onPostBootstrap - 0.194s
⠀
info bootstrap finished - 29.155 s
⠀
success Building production JavaScript and CSS bundles - 59.710s
success Rewriting compilation hashes - 0.005s
success run queries - 61.016s - 97/97 1.59/s
[                            ]   0.001 s 0/98 0% Building static HTML for pages
i18next: languageChanged en
i18next: languageChanged en
i18next: initialized {
  debug: true,
  initImmediate: true,
  ns: [ 'translation' ],
  defaultNS: 'translation',
  fallbackLng: [ 'en' ],
  fallbackNS: false,
  whitelist: false,
  nonExplicitWhitelist: false,
  load: 'languageOnly',
  preload: false,
  simplifyPluralSuffix: true,
  keySeparator: '.',
  nsSeparator: ':',
  pluralSeparator: '_',
  contextSeparator: '_',
  partialBundledLanguages: false,
  saveMissing: false,
  updateMissing: false,
  saveMissingTo: 'fallback',
  saveMissingPlurals: true,
  missingKeyHandler: false,
  missingInterpolationHandler: false,
  postProcess: false,
  returnNull: true,
  returnEmptyString: true,
  returnObjects: false,
  joinArrays: false,
  returnedObjectHandler: [Functi18next: initialized {
  debug: true,
  initImmediate: true,
  ns: [ 'translation' ],
  defaultNS: 'translation',
  fallbackLng: [ 'en' ],
  fallbackNS: false,
  whitelist: false,
  nonExplicitWhitelist: false,
  load: 'languageOnly',
  preload: false,
  simplifyPluralSuffix: true,
  keySeparator: '.',
  nsSeparator: ':',
  pluralSeparator: '_',
  contextSeparator: '_',
  partialBundledLanguages: false,
  saveMissing: false,
  updateMissing: false,
  saveMissingTo: 'fallback',
  saveMissingPlurals: true,
  missingKeyHandler: false,
  missingInterpolationHandler: false,
  postProcess: false,
  returnNull: true,
  returnEmptyString: true,
  returnObjects: false,
  joinArrays: false,
  returnedObjectHandler: [Function: returnedObjectHandler],
  parseMissingKeyHandler: false,
  appendNamespaceToMissingKey: false,
  appendNamespaceToCIMode: false,
  overloadTranslationOptionHandler: [Function: handle],
  interpolation: { escapeValue: false },
  resources: { en: { translation: [Object] }, fr: { translation: [Object] } },
  react: { wait: true, nsMode: 'default' }
}
ion: returnedObjectHandler],
  parseMissingKeyHandler: false,
  appendNamespaceToMissingKey: false,
  appendNamespaceToCIMode: false,
  overloadTranslationOptionHandler: [Function: handle],
  interpolation: { escapeValue: false },
  resources: { en: { translation: [Object] }, fr: { translation: [Object] } },
  react: { wait: true, nsMode: 'default' }
[==============              ]   11.817 s 50/98 51% Building static HTML for pages

success Building static HTML for pages - 12.124s - 98/98 8.08/s
success onPostBuild - 0.381s
info Done building in 103.31746359 sec

编辑:

这个安装解决了我的问题:)

npm 安装@hot-loader/react-dom