Сборка Netlify прошла, но показывает только html css - PullRequest
1 голос
/ 05 марта 2020

Мне нужна помощь по развертыванию netlify. На самом деле он развертывается и показывает «Опубликован», но я пробовал сборку Gatsby, и ничего не связывалось с ошибкой или каким-либо неудачным развертыванием netlify, но как только он был опубликован в Live, он показывает только html & css. Меню и выпадающие меню не работают. Но в localhost он показывает все.
Я не понимаю, почему после развертывания 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

1 Ответ

0 голосов
/ 11 марта 2020

Редактировать:

Эта установка решила мою проблему:)

npm install @ hot-loader / Reaction-dom

...