Comments (8)
I've not noticed this happening as much since I filed this bug originally. If it's been overnight or longer, or if my computer goes to sleep, it's more likely, but that's not a dealbreaker for me.
One thing that you can do to get the listener working again (and refresh your content) without restarting your dev server is to enable the refresh endpoint in Gatsby and then send a POST
request to it. To enable the endpoint you just set an environment variable named ENABLE_GATSBY_REFRESH_ENDPOINT
to a truthy value. I do this in .env
, but you can do the same running from the command line:
ENABLE_GATSBY_REFRESH_ENDPOINT=true gatsby develop
Once you do this, restart Gatsby and proceed like normal. When you notice your content isn't reloading, or if you want to pull fresh data from other non-live sources, send a POST request to http://localhost:8000/__refresh
. I like to set this up in my package.json
scripts for convenience:
"scripts": {
"develop": "ENABLE_GATSBY_REFRESH_ENDPOINT=true gatsby develop",
"refresh": "curl -X POST http://localhost:8000/__refresh"
}
Then you can just run yarn refresh
(or npm run refresh
) to get fresh content and re-enable the Sanity listener.
from gatsby-source-sanity.
I'm seeing the same thing. @coreyward is this a new issue for you or has it always happened?
from gatsby-source-sanity.
@dylanjha It's been an issue since I turned on watchMode on November 22nd.
from gatsby-source-sanity.
Seeing the same issue using the sanity-gatsby-blog starter.
from gatsby-source-sanity.
Also experiencing this. Both myself on localhost and our content editors previewing stuff with gatsby develop -H 0.0.0.0 on heroku. I have also turned off overlayDrafts.
from gatsby-source-sanity.
I have the same issue
from gatsby-source-sanity.
Confirming this is still happening on 1.150
.
from gatsby-source-sanity.
Thanks @coreyward - that's helpful!
from gatsby-source-sanity.
Related Issues (20)
- Dependency Dashboard
- Can't get GatsbyImageData from Image in Block element HOT 7
- Need to build from a previous export of the dataset
- GraphQLError: Runtime Object type "SanityImage" is not a possible type for "Image". when querying an array of images HOT 1
- Is the __node-manifests directory necessary for builds to run? HOT 3
- Planned support for Gatsby 5? HOT 5
- ERROR #11321 PLUGIN After update to 7.6.0 HOT 13
- getGatsbyImageData Unhandled Runtime Error HOT 2
- Include image filename with getGatsbyImageData
- crash desk tool - Error: Cannot get the start point in the node at path [1] because it has no start text node. HOT 1
- Mux assets are not resolved when there's a cache
- Error building gatsby after updating to 7.7.0 HOT 14
- Null values in graphql HOT 1
- ID field for reference types is null in graphql HOT 2
- Not able to filter ImageAssets by MediaTag
- Gatsby Config requires definition for "apiHost"
- [Feature Request] Add support for perspectives in plugin options
- Error: Unable to serialize object as a key
- Error: EINVAL: invalid argument
- `exports is not defined` error in client side bundle
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-source-sanity.