Comments (12)
My understanding is that '/search' is now server-side rendered. I'm curious to know how this should be deployed on a manual deployment and not using Gatsby cloud!
from gatsby-starter-shopify.
Maybe gatsby serve
from gatsby-starter-shopify.
My understanding is that '/search' is now server-side rendered.
Yes, I see that the approach towards fetching products has changed from the 3.x version (Understandably). I think the bug I describe, is somehow Gatsby related, though. If you simply resubmit a URL which makes your development server 404 under the conditions that I describe above - the correct view is actually rendered. So, if you simply hit enter after clicking in the address bar when you get this error, you are taken to the correct state of the application.
Whether or not this is related to the SSR that has been implemented - that I don't know enough about Gatsby to speak on.
I'm hoping that there are brighter minds here, who can provide some insight into why this might happen when a browser "back" button is clicked only. Could it perhaps be 'Back/forward cache' related?
from gatsby-starter-shopify.
I will also just note, that the exact same thing happened in the application that I was trying to migrate, which was how I noticed. No SSR on any page there. Upgrading from Gatsby v3 to v4 seems to have caused this issue.
from gatsby-starter-shopify.
I'm not having this issue with the back button (when using gatsby serve
). However I've noticed that I can't use a frontend proxy (like nginx) it always returns a 404 when attempting to reach /search
. If I run gatsby serve
by itself and access via port 9000 in the browser the search page functions as it should.
from gatsby-starter-shopify.
If I do a gatsby build
and deploy those files then /search
still 404s.
from gatsby-starter-shopify.
If I do a
gatsby build
and deploy those files then/search
still 404s.
Keep in mind, if you aren't deploying to Gatsby Cloud, you are going to need to either deploy to a provider that supports Gatsby's runtime SSR functionality that was introduced in v4 such as Netlify with the plugin @netlify/plugin-gatsby
and gatsby-plugin-netlify
. Make sure to get the beta version of each.
If you are deploying to a VPS, you'll need to run a node process via gatsby serve
, which has been re-worked in v4 so now it is designed for production use.
from gatsby-starter-shopify.
Before this issue gets derailed, I'd just like to reiterate that the 404 issues i describe in my OP occurs even though SSR functionality isn't implemented. Updating this starter to Gatsby V4, without implementing the SSR changes that were made to search.jsx
in conjuction with the v4 update, still produces this behavior.
The question is, if this is actually a framework issue?
from gatsby-starter-shopify.
If I do a
gatsby build
and deploy those files then/search
still 404s.Keep in mind, if you aren't deploying to Gatsby Cloud, you are going to need to either deploy to a provider that supports Gatsby's runtime SSR functionality that was introduced in v4 such as Netlify with the plugin
@netlify/plugin-gatsby
andgatsby-plugin-netlify
. Make sure to get the beta version of each.If you are deploying to a VPS, you'll need to run a node process via
gatsby serve
, which has been re-worked in v4 so now it is designed for production use.
thanks. It took a while to get that clarified regarding VPS use!
from gatsby-starter-shopify.
I am also having this issue. Locally search page exists. After pushing to netlify, it builds but the search page comes back as a 404.
from gatsby-starter-shopify.
I am also having the same issue. search page works locally but gives me 404 page on Netlify.
from gatsby-starter-shopify.
@yohdev-von in my case, The server side rendered pages that use getServerData works fine locally. it only gives me 404 page on Netlify. I was able to address this issue by installing @netlify/plugin-gatsby
(this one will be installed automatically for Gatsby sites on Netlify) and gatsby-plugin-netlify
plugins.
The reason why you get 404 on production is that for Server side rendering you need to have running NodeJS server(gatsby serve
).
FYI - https://github.com/netlify/netlify-plugin-gatsby/#readme
from gatsby-starter-shopify.
Related Issues (20)
- How can I use data directly from products.csv ? Not use shopify HOT 1
- Hello, Shopify latest version HOT 1
- On each product detail page, the product description format art gone HOT 2
- Discussion tab for the repo HOT 1
- Typo in Cart.jsx
- gatsby develop failed HOT 1
- Refresh "/public/page-data" HOT 1
- All products page only shows one product - develop warning
- Error: Unauthorized HOT 1
- Cannot query field "images" on type "ShopifyProduct". HOT 6
- Path /products/ resolves to /products/{ShopifyProduct.productType}/
- When adding an item to the cart after hosting it on Gatsby Cloud/Netlify, it displays "updating" therefore unable to proceed to checkout. Any help >? HOT 1
- Runtime error HOT 2
- variantForOptions always return undefined
- gatsby-starter-shopify - Inventory Issue
- gatsby-starter-shopify - Variant Stock Issue
- Problem with gatsby-source-shopify 8.2.0 HOT 2
- Gatsby Cloud Sales Channel on Shopify is not working
- Variants, Add to Cart and Quantity Selector for Product Cards HOT 1
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-starter-shopify.