Closed ansmlc closed 1 year ago
Hey @ansmlc! Sorry for the late response. Seems like it may causes conflicts with the existing query. Have you tried changing the query and renaming it (e.g ProjectsSectionQuery2
)? If that doesn't fix it, it will take a closer look at the issue locally 👍
Hi, thanks for creating this awesome theme! I'm trying to shadow the theme files so I can customize it to my needs, and could some help.
I shadowed the entire theme, not just some components, as otherwise there's a lot of missing dependency errors to deal with. I copied the entire contents of
my-portfolio/node_modules/gatsby-theme-portfolio-minimal/src
directory intomy-portfolio/src/gatsby-theme-portfolio-minimal/
.Error occurs when editing
ProjectsSectionQuery
query inmy-portfolio/src/gatsby-theme-portfolio-minimal/sections/Projects/data.tsx
, causing the development build to fail. Not sure but it seems to be related to caching issues.Specifically, I came across this as I tried to increase project image size. Either changing the
width
value or removing it altogether causes the same build error:As a test, I also tried removing the
linkTo
from theimage
node (which I'm not using inprojects.json
anyway), which causes the same error. I haven't tried editing any otherdata.tsx
components or queries.1. Running
gatsby develop
shows this error:2. If the query is edited while development build is already running, it works and changes are successfully reflected on
localhost:8000
. However, if the dev server is restarted, it fails again with the above error.3. Running
gatsby build
successfully builds every time. However, if the build contains the edited query, runninggatsby serve
onlocalhost:9000
just shows a blank screen, while the DevTools console shows errors:If this is not reproducing, run
gatsby clean
beforegatsby build
.4. There are no issues when editing other shadowed files, whether it's components or styles, as long as the Query is untouched. Both
gatsby develop
andgatsby build
work fine and the page is properly rendered, including any changes in other shadow files.