Bare-bones structure to demonstrate issue when a Gastby theme has a local plugin and is installed as a theme in another project/directory.
Structure based on Building a Theme tutorial, including using Yarn workspaces to manage the sibling projects, gatsby-theme-test
and site
.
To trigger issue:
- run
yarn workspace gatsby-theme-test
to install packages - run
yarn workspace gatsby-theme-test develop
to see it successfully passload plugins
build step - run
yarn workspace site
to install packages (includinggatsby-theme-test
) - run
yarn workspace site develop
orcd site && gatsby develop
to see it fail theload plugins
build step displaying this error:
ERROR
UNHANDLED REJECTION Unable to find plugin "gatsby-local-plugin". Perhaps you need to install its package?
Error: Unable to find plugin "gatsby-local-plugin". Perhaps you need to install its package?
- load.js:109 resolvePlugin
[test-gatsby-theme]/[gatsby]/dist/bootstrap/load-plugins/load.js:109:11
...