Hey Team,
I am experiencing a critical and persistent issue with my project’s static file deployment, specifically with JSON product definition files, and I’m hoping you can assist. Despite extensive troubleshooting on my end, the issue persists, indicating a problem on the Vercel platform’s serving or build process for these specific assets.
Project Details:
- Vercel Project Name:
tom-roxboroughs-projects / thornevald - Domain:
www.thornevald.com
Problem Description: When deploying my Vite/React application, specifically the public/products/*.json static files, they are consistently being served in an incomplete format, leading to critical errors with a third-party e-commerce integration (Snipcart).
Details of the Issue: My e-commerce integration relies on Snipcart crawling a specific JSON file for each product (e.g., https://www.thornevald.com/products/grimwood-ghost.json) to validate item data. However, the JSON files being served from Vercel are incomplete.
-
**Expected Content (Local
public/products/grimwood-ghost.jsonanddist/products/grimwood-ghost.jsonafternpm run build): -
**
JSON{ "id": "grimwood-ghost", "name": "THE LITTLE GHOST OF GRIMWOOD", "price": 10.00, "url": "/products/grimwood-ghost.json", "image": "/images/grimwood-ghost.jpg" }
(Note: This structure is consistent across all product JSON files.)
- **Actual Content Served from Vercel’s CDN (verified via Incognito browser access to
https://www.thornevald.com/products/grimwood-ghost.jsonand DevTools, even minutes after a fresh deploy):
****JSON { "id": "grimwood-ghost", "url": "/products/grimwood-ghost.json", }
As you can see, the name, price, description, and image fields are missing from the served file.
Impact: Snipcart’s crawler is reporting errors like Reason: 'product-crawling-failed' and [Status] PriceNotFound because it cannot find the expected product data (specifically the price) in the incomplete JSON it retrieves.
Troubleshooting Steps Already Performed (Extensive):
-
Local File Verification: Confirmed that all
public/products/*.jsonfiles on my local machine contain the complete and correct product data (includingname,price,description,image, and no comments). -
Local Build Verification: Confirmed that after running
npm run build, thedist/products/*.jsonfiles locally contain the complete and correct product data. -
GitHub Push: Ensured all local changes, including the updated JSON files, have been successfully
git add,git commit, andgit pushed to themainbranch of my GitHub repository (github.com/tom-roxborough/book-app). -
Vercel Deployment Trigger: Confirmed Vercel is set to auto-deploy from
mainbranch. -
Vercel Build Logs Review: Reviewed the build logs for the latest deployments on Vercel. They show no errors or warnings related to the
publicdirectory, static asset copying, or the build process itself (Vite reports a successful build). -
Vercel Cache Purging: Performed multiple redeploys, explicitly selecting “Redeploy without Build Cache.” I also manually purged both “CDN Cache” and “Data Cache” from the “Caches” section in Vercel project settings.
-
Live URL Direct Access: Verified directly in multiple Incognito browser windows, immediately after a fresh Vercel deploy and cache purge, that
https://www.thornevald.com/products/grimwood-ghost.json(and other similar product JSONs) still serves the incomplete JSON content, despite the file being updated locally. TheDateandLast-Modifiedheaders on the served incomplete file indicate it’s very recent, confirming it’s not simply an old CDN cache. -
Snipcart Button Configuration: Confirmed the
snipcart-add-itembutton inBookDetail.tsxis correctly configured (data-item-urlpoints to the JSON,data-item-json-urlis removed).
Request:
Given that my local files and build output are correct, and Vercel’s logs show a successful build, but the served static files are incomplete, I believe this points to an issue within Vercel’s platform. Could you please investigate why the complete contents of my public/products/*.json files are not being deployed or served correctly from the Vercel CDN?
Thank you for your time and assistance in resolving this critical issue.