Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing gatsby clean from gatsby build process #570

Open
LarsBehrenberg opened this issue May 17, 2020 · 2 comments
Open

Removing gatsby clean from gatsby build process #570

LarsBehrenberg opened this issue May 17, 2020 · 2 comments

Comments

@LarsBehrenberg
Copy link

Feature request

I am currently running a Gatsby w/ NetlifyCMS site and have been looking for a workaround so I don't have to run gatsby clean every time after changes have been made in the CMS => meaning removing the gatsby clean from the build command.

What is the expected behavior?
Running gatsby from cache, keeping already formatted images and only rebuild pages where changes have been made.

What is motivation or use case for adding/changing the behavior?
Due to the large number of images on my site, having to rebuild every time from scratch takes a lot longer than it should.

How should this be implemented in your opinion?
The problem seems to be that images cannot be found after changes have been made to the md file resulting in "Cannot read property 'childImageSharp' of null". So far only removing the cache and public folder seems to resolve the issue, but this comes with long building times.

Are you willing to work on this yourself?
yes

@ZoltanVeres
Copy link
Collaborator

ZoltanVeres commented May 21, 2020

The only viable option i see is do what Jason wrote in this article about enabling Gatsby incremental build. Please post back to us if you happen to go down this path

@kenfehling
Copy link

I was having a similar issue, seemingly identical to this error. I updated gatsby-remark-relative-images to version 2.0.2 and that fixed it for me. Pull Request 621 is already open for bumping that dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants