ekafyi / gatsby-theme-musician

A Gatsby theme for bands and music artists 🎸🎙
https://gatsby-theme-musician.netlify.com
MIT License
74 stars 21 forks source link

ERROR #85923 GRAPHQL - when adding to a website #6

Open benstaf opened 4 years ago

benstaf commented 4 years ago

Hi, the template works great as a standalone website, but when I want to add it to another website, it crashes.

I did:

npm install --save gatsby-theme-musician

and I added the plugin, and I got the error:

gatsby develop

success open and validate gatsby-configs - 1.191s success load plugins - 66.170s success onPreInit - 0.721s success initialize cache - 0.124s success copy gatsby files - 4.019s success onPreBootstrap - 0.931s success createSchemaCustomization - 0.023s success source and transform nodes - 6.700s success building schema - 1.285s

Config rootPath not set, using basePath instead => blog

Config basePath blog

Config authorsPath /authors

Querying Authors & Articles source: Local

ERROR #85923 GRAPHQL

There was an error in your GraphQL query:

Cannot query field "secret" on type "Article".

If you don't expect "secret" to exist on the type "Article" it is most likely a typo. However, if you expect "secret" to exist there are a couple of solutions to common problems:

It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "Article": https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: node_modules/@narative/gatsby-theme-novela/src/gatsby/node/createPages.js:85:35

ERROR #85923 GRAPHQL

There was an error in your GraphQL query:

Cannot query field "subscription" on type "Article".

If you don't expect "subscription" to exist on the type "Article" it is most likely a typo. However, if you expect "subscription" to exist there are a couple of solutions to common problems:

It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "Article": https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: node_modules/@narative/gatsby-theme-novela/src/gatsby/node/createPages.js:85:35

ERROR

TypeError: Cannot read property 'articles' of undefined at Object.module.exports [as createPages] (/home/mostafa/Desktop/CAR_T_solid_blog/landing_and_blog/blog_site_go_here/node_modules/@narative/gatsby-theme-novela/src/gatsby/node/createPages.js:91:55)

ERROR #11321 PLUGIN

"@narative/gatsby-theme-novela" threw an error while running the createPages lifecycle:

You must have at least one Author and Post. As reference you can view the
example repository. Look at the content folder in the example repo.
https://github.com/narative/gatsby-theme-novela-example

failed createPages - 5.921s success createPagesStatefully - 0.652s success onPreExtractQueries - 0.020s success update schema - 0.136s success extract queries from components - 6.996s success write out requires - 0.253s success write out redirect data - 0.007s success Build manifest and related icons - 2.339s success onPostBootstrap - 2.400s ⠀ info bootstrap finished - 167.650 s ⠀ success run queries - 2.250s - 26/26 11.55/s ⠀ You can now view site in the browser. ⠀ http://localhost:8001/ ⠀ View GraphiQL, an in-browser IDE, to explore your site's data and schema ⠀ http://localhost:8001/___graphql ⠀ Note that the development build is not optimized. To create a production build, use gatsby build ⠀ success Building development bundle - 38.544s

ekafyi commented 4 years ago

Sorry for not keeping up with this repo! I haven't had the chance to check and work on this, but just in case, have you tried the fix(es) in this thread? Been seeing that error pop off in many Gatsby themes, and some of them solved by those fixes.