Gatsby Js
Light
help

Resources

What & Link Type
Gatsby Docs Documentation
Master example repo Examples

Troubleshooting Gatsby

When in doubt, rebuild node_modules

rm -rf node_modules && npm install

Optional: delete package-lock.json

Misc issues:

  • Plugin can't be resolved

    • Make sure the name is typed correctly
    • If developing a local plugin, make sure that you put it in {root}/plugins/{myPlugin} and not {root}/src/plugins/{myPlugin}. Plugins dir needs to be in same directory as package.json
  • Updates not showing

    • Try using gatsby clean
  • Error on trying to debug with: basedir= ... missing ) after argument list on Windows

    • Make sure the path you are calling looks like node_modules/gatsby/dist/bing/gatsby and not node_modules/.bin/gatsby

Plugin development

Remark Based Plugin

Helpful Packages

Name Package Description
syntax-tree/unis-util-visit unist-util-visit Utility to visit AST nodes
syntax-tree/unis-util-select unist-util-select Very neat - utility that lets you select nodes with a syntax close to CSS queryselectors

Existing Plugins

Name Description
gatsby-* - folder These are the default Gatsby plugins, hosted with the Gatsby mono-repo. Great examples.
gatsby-remark-component Changes the parent node / element of a custom component to a div
Markdown Source Last Updated:
Tue Feb 18 2020 05:37:22 GMT+0000 (Coordinated Universal Time)
Markdown Source Created:
Sun Dec 08 2019 21:09:12 GMT+0000 (Coordinated Universal Time)