Гэтсби - команда 'gatsby develop' выполнена без ошибок. Не дает ошибок или информации - PullRequest
0 голосов
/ 28 мая 2020

Я новичок в Gatsby, каждый раз, когда я запускаю команду gatsby develop, мой терминал поражается.

Он дает следующий результат и остается там навсегда. Никаких ошибок или информации не отображается.

tarun@192 gatsby-starter-hero-blog-v2 % gatsby develop 
success open and validate gatsby-configs - 0.294s
success load plugins - 5.575s
warn The Google Analytics plugin requires a tracking ID. Did you mean to add it?
success onPreInit - 0.028s
success initialize cache - 0.010s
success copy gatsby files - 0.202s
warn gatsby-plugin-feed was initialized in gatsby-config.js without a title in a feed.
This means that the plugin will use the default feed title, which may not match your use case.
This behavior will be removed in the next major release of gatsby-plugin-feed.
For more info, check out: https://gatsby.dev/adding-rss-feed
success onPreBootstrap - 0.030s
success createSchemaCustomization - 0.292s
success source and transform nodes - 0.530s
success building schema - 1.660s
Using environment config: 'development'
success createPages - 0.115s
success createPagesStatefully - 0.211s
success onPreExtractQueries - 0.002s
success update schema - 0.189s
warn Using the global `graphql` tag is deprecated, and will not be supported in v3.
Import it instead like:  import { graphql } from 'gatsby' in file:
/Users/mac/Documents/Projects/gatsby-starter-hero-blog-v2/node_modules/gatsby-plugin-algolia/example/src/layouts/index.js
success extract queries from components - 0.544s
warn The GraphQL query in the non-page component
Exported queries are only executed for Page components. It's possible you're
trying to create pages in your gatsby-node.js and that's failing for some
reason.

If the failing component(s) is a regular component and not intended to be a page
component, you generally want to use a <StaticQuery> (https://gatsbyjs.org/docs/static-query)
instead of exporting a page query.

If you're more experienced with GraphQL, you can also export GraphQL
fragments from components and compose the fragments in the Page component
query and pass data down into the child component — https://graphql.org/learn/queries/#fragments
success write out requires - 0.092s
success write out redirect data - 0.019s
success Build manifest and related icons - 0.092s
success onPostBootstrap - 0.103s
⠀
info bootstrap finished - 18.181s
⠀
success run queries - 0.062s - 3/3 48.77/s

Любая помощь приветствуется

Ответы [ 2 ]

1 голос
/ 28 мая 2020

Проще говоря:

import { graphql } from 'gatsby'

Импортируйте таким образом gatsby-node.js и все остальные .js файлы. Будет полезно, если вы также поделитесь кодом.

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

Спасибо Ребята, решение нашёл.

На самом деле Гэтсби требует только узел 10. Я изменил версию, и теперь она решена.

См. Ссылки ниже

https://twitter.com/tarunnagpal78/status/1265873049707933696

https://github.com/gatsbyjs/gatsby/issues/11167

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...