Renaming lessons breaks build
Closed this issue · 6 comments
I've been trying to rename the lessons but it seems that it breaks the build.
Am I missing something obvious? do they have to remain named lesson_n.md
?
I've stashed my changes in branch brokengatsby
here https://github.com/unofficialoraclecloudhub/oracledb-graphql-demo/tree/brokengatsby/docs
the new directory structure given below & I've updated
table_of_contents.json
and SiteConfig.js
content
├── lessons
│ ├── lesson_five.md
│ ├── lesson_four.md
│ ├── lesson_one.md
│ ├── lesson_six.md
│ ├── lesson_three.md
│ ├── run_locally_with_docker.md
│ └── table_of_contents.json
└── posts
└── post_one.md
running gatsby develop --verbose
returns the below to the console
verbose 2.428 set gatsby_log_level: "verbose"
verbose 2.434 set gatsby_executing_command: "develop"
verbose 2.439 loading local command from: /Users/SBlack4/Git/oracledb-graphql-demo/docs/node_modules/gatsby/dist/commands/develop.js
verbose 12.68 running command: develop
success delete html and css files from previous builds — 0.014 s
success open and validate gatsby-config.js — 0.019 s
success copy gatsby files — 0.044 s
success onPreBootstrap — 2.010 s
success source and transform nodes — 0.110 s
success building schema — 1.496 s
success createLayouts — 0.019 s
success createPages — 0.064 s
success createPagesStatefully — 0.031 s
success onPreExtractQueries — 0.001 s
success update schema — 0.207 s
GraphQL Error Field "entry" must not have a selection since type "String" has no subfields.
file: /Users/SBlack4/Git/oracledb-graphql-demo/docs/src/templates/lesson.jsx
24 | }
25 | frontmatter {
26 | title
27 | }
28 | }
29 | }
30 | }
31 | chapters {
32 | title
33 | entries {
> 34 | entry {
| ^
35 | id
36 | childMarkdownRemark {
37 | fields {
38 | slug
39 | }
40 | frontmatter {
41 | title
42 | }
43 | }
44 | }
success extract queries from components — 0.104 s
success run graphql queries — 0.021 s
success write out page data — 0.010 s
success write out redirect data — 0.001 s
success onPostBootstrap — 0.001 s
info bootstrap finished - 17.47 s
DONE Compiled successfully in 51962ms 15:09:48
You can now view gatsby-docs-starter in the browser.
http://localhost:8000/
View GraphiQL, an in-browser IDE, to explore your site's data and schema
http://localhost:8000/___graphql
Note that the development build is not optimized.
To create a production build, use gatsby build
WAIT Compiling... 15:09:49
DONE Compiled successfully in 505ms
and renders and error page in the browser
×
TypeError: Cannot read property 'allMarkdown' of undefined
Index.render
src/pages/index.jsx:12
9 |
10 | class Index extends React.Component {
11 | render() {
> 12 | const allSEOMarkdown = this.props.data.allMarkdown.edges
13 |
14 | return (
15 | <div className="index-container">
View compiled
▶ 49 stack frames were collapsed.
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.
@sblack4 I've seen this error before, and it's not an issue with the starter. You have a typo somewhere in your tableofcontents json against your file names. I suggest getting help in the discord channel:
https://discordapp.com/channels/102860784329052160/103314369600843776
The file does not exist, right? I guess it should be added...
I'm having the same issue -- have checked the table of contents and they're the same. @sblack4 did you resolve for yourself?
@cassiewallace I haven't had a chance to test it yet (or resolve it) I'm checking now
I just took a look at this issue and tried removing .cache
and running gatsby develop
again. This worked -- it doesn't seem that the Table of Contents hot reloads, so it's out of sync with the changes.
@cassiewallace same thing result here! thanks!