https://github.com/wirehead/gatsby-component-plugin-bug
Example case for not being able to use React components from a local plugin
https://github.com/wirehead/gatsby-component-plugin-bug
Last synced: 26 days ago
JSON representation
Example case for not being able to use React components from a local plugin
- Host: GitHub
- URL: https://github.com/wirehead/gatsby-component-plugin-bug
- Owner: wirehead
- License: mit
- Created: 2020-04-04T22:52:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T00:02:05.000Z (over 3 years ago)
- Last Synced: 2025-02-23T12:57:29.328Z (over 1 year ago)
- Language: CSS
- Size: 4.15 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 42
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Example case for not being able to use React components from a local plugin
1. Generated from `gatsby new gatsby-component-plugin-bug`
2. Created `plugins/gatsby-local-plugin` and added the required files (index.js, gatsby-config.js) and ran `npm install`
3. Moved the implementation of `header.js` from the `src` directory to inside the new plugin
4. Adjusted paths
5. Added the local plugin
What happend:
```
> gatsby develop
success open and validate gatsby-configs - 0.052s
success load plugins - 2.393s
successIonPreInit - 0.005s
successainitialize cache - 0.008s
success copy gatsby files - 0.191s
success onPreBootstrap - 0.024s
success createSchemaCustomization - 0.011s
success source and transform nodes - 0.098s
success building schema - 0.345s
successecreatePages - 0.002s
success createPagesStatefully - 0.096s
success onPreExtractQueries - 0.002s
success update schema - 0.029s
success extract queries from components - 0.305s
success write out requires - 0.047s
success write out redirect data - 0.004s
success Build manifest and related icons - 0.123s
success onPostBootstrap - 0.130s
⠀
info bootstrap finished - 8.768 s
⠀
success run queries - 0.155s - 7/7 45.02/s
success Generating image thumbnails - 4.277s - 6/6 1.40/s
ERROR #98123 WEBPACK
Generating development JavaScript bundle failed
Can't resolve 'gatsby-local-plugin/header' in 'C:\Users\wirehead\Documents\src\gatsby-component-plugin-bug\src\component
s'
File: src\components\layout.js
faileddBuilding development bundle - 20.027s
```