Error in node creation for @reflexjs/gatsby-theme-doc
See original GitHub issueMaybe I’m just being impatient to try out an unreleased (?) Gatsby theme, but I get the following error when adding @reflexjs/gatsby-theme-doc
to the base starter and adding an example MDX file in content/docs/
.
error "@reflexjs/gatsby-theme-doc" threw an error while running the onCreateNode lifecycle:
object null is not iterable (cannot read property Symbol(Symbol.iterator))
56 | if (docNode) {
57 | const parent = getNode(node.parent)
> 58 | const [, weight, name] = parent.name.match(/^(\d+)-(.*)/)
| ^
59 | actions.createNode({
60 | ...docNode,
61 | weight: parseInt(weight),
TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
- gatsby-node.js:58 Object.exports.onCreateNode
[eadocs-reflex]/[@reflexjs]/gatsby-theme-doc/gatsby-node.js:58:30
Also, I don’t see any examples or references to this theme in the docs (as the README.md for the package suggests). If this is still an upcoming feature, that makes perfect sense—and I can’t wait to try it when it’s ready!
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Troubleshoot EKS managed node group failures - AWS
My Amazon Elastic Kubernetes Service (Amazon EKS) managed node group failed to create. Nodes can't join the cluster and I received an error...
Read more >21 minutes. error waiting for EKS Node Group to create ...
My node groups will create but fail. The autoscaling instances will spin up hosts but they won't attach to the cluster. vpc-cni fails...
Read more >Node.js — Create Your Own Custom Error - Future Studio
Errors in Node.js are extensible classes. This tutorial walks you through the creation of your own error class.
Read more >Errors | Node.js v19.3.0 Documentation
SyntaxError instances are unrecoverable in the context that created them – they may only be caught by other contexts. Class: SystemError #. Extends:...
Read more >Node.js Error Handling Best Practices: Ship With Confidence
The built-in error constructor is simply a unified way of creating an error object. What are error objects, anyway? Why do they need...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK I looked into it a bit and created an example here:
Demo: https://reflexjs-product-docs.netlify.app Repo: https://github.com/arshad/reflexjs-product-docs
How it works
Reflexjs has support for additional fields that are passed down from frontmatter to the schema.
doc.js
anddoc-nav.js
to accept thisnav
as prop.https://github.com/arshad/reflexjs-product-docs/blob/master/src/%40reflexjs/gatsby-theme-doc/doc-nav.js#L112
https://github.com/arshad/reflexjs-product-docs/blob/e6560305f337f455ce36f3c66b5bb4c0b498cd8d/src/%40reflexjs/gatsby-theme-doc/doc.js#L76
Yeah. I can take a look at it.
The other themes support subfolders so I think it should be easy to add.