commerceplate icon indicating copy to clipboard operation
commerceplate copied to clipboard

message: 'Failed to parse URL from /api/2023-01/graphql.json',

Open millionstack opened this issue 1 year ago • 2 comments

My .env code here " SHOPIFY_API_SECRET_KEY="6d99e3fe8fff2afe0a020288d71dc4ab" SHOPIFY_STOREFRONT_ACCESS_TOKEN="67d5d7706b8a8329bc8ba56d695e8652" SHOPIFY_STORE_DOMAIN="fishingshopnearme.myshopify.com""

config.json "{ "site": { "title": "Commerceplate", "base_url": "https://tf-commerceplate.netlify.app/", "base_path": "/", "trailing_slash": false, "favicon": "/images/favicon.png", "logo": "/images/logo.png", "logo_darkmode": "/images/logo-darkmode.png", "logo_width": "150", "logo_height": "27", "logo_text": "Commerceplate" },

"settings": { "search": true, "account": true, "sticky_header": true, "theme_switcher": true, "default_theme": "system", "pagination_card": 9, "pagination_list": 4, "summary_length": 200, "blog_folder": "blog" },

"params": { "contact_form_action": "#", "copyright": "Designed And Developed by Zeon Studio" },

"navigation_button": { "enable": false, "label": "Get Started", "link": "https://github.com/zeon-studio/commerceplate" },

"metadata": { "meta_author": "Zeon Studio", "meta_image": "/images/og-image.png", "meta_description": "Shopify Storefront Boilerplate" },

"shopify": { "currencySymbol": "৳", "currencyCode": "BDT", "collections": { "hero_slider": "hidden-homepage-carousel", "featured_products": "featured-products" } } } "{ "site": { "title": "Commerceplate", "base_url": "https://tf-commerceplate.netlify.app/", "base_path": "/", "trailing_slash": false, "favicon": "/images/favicon.png", "logo": "/images/logo.png", "logo_darkmode": "/images/logo-darkmode.png", "logo_width": "150", "logo_height": "27", "logo_text": "Commerceplate" },

"settings": { "search": true, "account": true, "sticky_header": true, "theme_switcher": true, "default_theme": "system", "pagination_card": 9, "pagination_list": 4, "summary_length": 200, "blog_folder": "blog" },

"params": { "contact_form_action": "#", "copyright": "Designed And Developed by Zeon Studio" },

"navigation_button": { "enable": false, "label": "Get Started", "link": "https://github.com/zeon-studio/commerceplate" },

"metadata": { "meta_author": "Zeon Studio", "meta_image": "/images/og-image.png", "meta_description": "Shopify Storefront Boilerplate" },

"shopify": { "currencySymbol": "৳", "currencyCode": "BDT", "collections": { "hero_slider": "hidden-homepage-carousel", "featured_products": "featured-products" } } }"

Here is the error when i run the code

status: 500, message: 'Failed to parse URL from /api/2023-01/graphql.json', query: '\n' + ' query getCollectionProducts(\n' + ' $handle: String!\n' + ' $sortKey: ProductCollectionSortKeys\n' + ' $reverse: Boolean\n' + ' $filterCategoryProduct: [ProductFilter!]\n' + ' ) {\n' + ' collection(handle: $handle) {\n' + ' products(\n' + ' sortKey: $sortKey\n' + ' reverse: $reverse\n' + ' first: 100\n' + ' filters: $filterCategoryProduct\n' + ' ) {\n' + ' edges {\n' + ' node {\n' + ' ...product\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment product on Product {\n' + ' id\n' + ' handle\n' + ' availableForSale\n' + ' title\n' + ' description\n' + ' descriptionHtml\n' + ' options {\n' + ' id\n' + ' name\n' + ' values\n' + ' }\n' + ' priceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' minVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' compareAtPriceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' variants(first: 250) {\n' + ' edges {\n' + ' node {\n' + ' id\n' + ' title\n' + ' availableForSale\n' + ' selectedOptions {\n' + ' name\n' + ' value\n' + ' }\n' + ' price {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' compareAtPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' featuredImage {\n' + ' ...image\n' + ' }\n' + ' images(first: 20) {\n' + ' edges {\n' + ' node {\n' + ' ...image\n' + ' }\n' + ' }\n' + ' }\n' + ' seo {\n' + ' ...seo\n' + ' }\n' + ' tags\n' + ' updatedAt\n' + ' vendor\n' + ' collections(first: 100) {\n' + ' nodes {\n' + ' title\n' + ' products(first: 100) {\n' + ' edges {\n' + ' node {\n' + ' title\n' + ' vendor\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment image on Image {\n' + ' url\n' + ' altText\n' + ' width\n' + ' height\n' + ' }\n' + '\n' + ' \n' + ' fragment seo on SEO {\n' + ' description\n' + ' title\n' + ' }\n' + '\n' + '\n' } ⨯ [Error: Error: [object Object]] { digest: '3993220912' } ⨯ [Error: Error: [object Object]] { digest: '3993220912' } ⨯ [Error: Error: [object Object]] { digest: '3993220912' } ⨯ { cause: 'TypeError: Invalid URL', status: 500, message: 'Failed to parse URL from /api/2023-01/graphql.json', query: '\n' + ' query getCollectionProducts(\n' + ' $handle: String!\n' + ' $sortKey: ProductCollectionSortKeys\n' + ' $reverse: Boolean\n' + ' $filterCategoryProduct: [ProductFilter!]\n' + ' ) {\n' + ' collection(handle: $handle) {\n' + ' products(\n' + ' sortKey: $sortKey\n' + ' reverse: $reverse\n' + ' first: 100\n' + ' filters: $filterCategoryProduct\n' + ' ) {\n' + ' edges {\n' + ' node {\n' + ' ...product\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment product on Product {\n' + ' id\n' + ' handle\n' + ' availableForSale\n' + ' title\n' + ' description\n' + ' descriptionHtml\n' + ' options {\n' + ' id\n' + ' name\n' + ' values\n' + ' }\n' + ' priceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' minVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' compareAtPriceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' variants(first: 250) {\n' + ' edges {\n' + ' node {\n' + ' id\n' + ' title\n' + ' availableForSale\n' + ' selectedOptions {\n' + ' name\n' + ' value\n' + ' }\n' + ' price {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' compareAtPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' featuredImage {\n' + ' ...image\n' + ' }\n' + ' images(first: 20) {\n' + ' edges {\n' + ' node {\n' + ' ...image\n' + ' }\n' + ' }\n' + ' }\n' + ' seo {\n' + ' ...seo\n' + ' }\n' + ' tags\n' + ' updatedAt\n' + ' vendor\n' + ' collections(first: 100) {\n' + ' nodes {\n' + ' title\n' + ' products(first: 100) {\n' + ' edges {\n' + ' node {\n' + ' title\n' + ' vendor\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment image on Image {\n' + ' url\n' + ' altText\n' + ' width\n' + ' height\n' + ' }\n' + '\n' + ' \n' + ' fragment seo on SEO {\n' + ' description\n' + ' title\n' + ' }\n' + '\n' + '\n' } ⨯ { cause: 'TypeError: Invalid URL', status: 500, message: 'Failed to parse URL from /api/2023-01/graphql.json', query: '\n' + ' query getCollections {\n' + ' collections(first: 100, sortKey: TITLE) {\n' + ' edges {\n' + ' node {\n' + ' ...collection\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment collection on Collection {\n' + ' handle\n' + ' title\n' + ' description\n' + ' image {\n' + ' altText\n' + ' url\n' + ' }\n' + ' seo {\n' + ' ...seo\n' + ' }\n' + ' updatedAt\n' + ' products(first: 100) {\n' + ' edges {\n' + ' node {\n' + ' id\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment seo on SEO {\n' + ' description\n' + ' title\n' + ' }\n' + '\n' + '\n' } ⨯ { cause: 'TypeError: Invalid URL', status: 500, message: 'Failed to parse URL from /api/2023-01/graphql.json', query: '\n' + ' query getCollectionProducts(\n' + ' $handle: String!\n' + ' $sortKey: ProductCollectionSortKeys\n' + ' $reverse: Boolean\n' + ' $filterCategoryProduct: [ProductFilter!]\n' + ' ) {\n' + ' collection(handle: $handle) {\n' + ' products(\n' + ' sortKey: $sortKey\n' + ' reverse: $reverse\n' + ' first: 100\n' + ' filters: $filterCategoryProduct\n' + ' ) {\n' + ' edges {\n' + ' node {\n' + ' ...product\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment product on Product {\n' + ' id\n' + ' handle\n' + ' availableForSale\n' + ' title\n' + ' description\n' + ' descriptionHtml\n' + ' options {\n' + ' id\n' + ' name\n' + ' values\n' + ' }\n' + ' priceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' minVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' compareAtPriceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' variants(first: 250) {\n' + ' edges {\n' + ' node {\n' + ' id\n' + ' title\n' + ' availableForSale\n' + ' selectedOptions {\n' + ' name\n' + ' value\n' + ' }\n' + ' price {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' compareAtPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' featuredImage {\n' + ' ...image\n' + ' }\n' + ' images(first: 20) {\n' + ' edges {\n' + ' node {\n' + ' ...image\n' + ' }\n' + ' }\n' + ' }\n' + ' seo {\n' + ' ...seo\n' + ' }\n' + ' tags\n' + ' updatedAt\n' + ' vendor\n' + ' collections(first: 100) {\n' + ' nodes {\n' + ' title\n' + ' products(first: 100) {\n' + ' edges {\n' + ' node {\n' + ' title\n' + ' vendor\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment image on Image {\n' + ' url\n' + ' altText\n' + ' width\n' + ' height\n' + ' }\n' + '\n' + ' \n' + ' fragment seo on SEO {\n' + ' description\n' + ' title\n' + ' }\n' + '\n' + '\n' } ⨯ [Error: Error: [object Object]] { digest: '3993220912' } ⨯ [Error: Error: [object Object]] { digest: '3993220912' } ⨯ [Error: Error: [object Object]] { digest: '3993220912' } ?[?25h

tanveer@DESKTOP-70EBVBN MINGW64 ~/Desktop/ecom/commerceplate (main) $ ^C

tanveer@DESKTOP-70EBVBN MINGW64 ~/Desktop/ecom/commerceplate (main) $ npm run dev

[email protected] dev next dev

▲ Next.js 14.1.0

  • Local: http://localhost:3000
  • Experiments (use at your own risk): · missingSuspenseWithCSRBailout

✓ Ready in 26.5s ○ Compiling / ... ✓ Compiled / in 32.9s (1257 modules) ⨯ { cause: 'TypeError: Invalid URL', status: 500, message: 'Failed to parse URL from /api/2023-01/graphql.json', query: '\n' + ' query getCollectionProducts(\n' + ' $handle: String!\n' + ' $sortKey: ProductCollectionSortKeys\n' + ' $reverse: Boolean\n' + ' $filterCategoryProduct: [ProductFilter!]\n' + ' ) {\n' + ' collection(handle: $handle) {\n' + ' products(\n' + ' sortKey: $sortKey\n' + ' reverse: $reverse\n' + ' first: 100\n' + ' filters: $filterCategoryProduct\n' + ' ) {\n' + ' edges {\n' + ' node {\n' + ' ...product\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment product on Product {\n' + ' id\n' + ' handle\n' + ' availableForSale\n' + ' title\n' + ' description\n' + ' descriptionHtml\n' + ' options {\n' + ' id\n' + ' name\n' + ' values\n' + ' }\n' + ' priceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' minVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' compareAtPriceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' variants(first: 250) {\n' + ' edges {\n' + ' node {\n' + ' id\n' + ' title\n' + ' availableForSale\n' + ' selectedOptions {\n' + ' name\n' + ' value\n' + ' }\n' + ' price {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' compareAtPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' featuredImage {\n' + ' ...image\n' + ' }\n' + ' images(first: 20) {\n' + ' edges {\n' + ' node {\n' + ' ...image\n' + ' }\n' + ' }\n' + ' }\n' + ' seo {\n' + ' ...seo\n' + ' }\n' + ' tags\n' + ' updatedAt\n' + ' vendor\n' + ' collections(first: 100) {\n' + ' nodes {\n' + ' title\n' + ' products(first: 100) {\n' + ' edges {\n' + ' node {\n' + ' title\n' + ' vendor\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment image on Image {\n' + ' url\n' + ' altText\n' + ' width\n' + ' height\n' + ' }\n' + '\n' + ' \n' + ' fragment seo on SEO {\n' + ' description\n' + ' title\n' + ' }\n' + '\n' + '\n' } ⨯ { cause: 'TypeError: Invalid URL', status: 500, message: 'Failed to parse URL from /api/2023-01/graphql.json', query: '\n' + ' query getCollections {\n' + ' collections(first: 100, sortKey: TITLE) {\n' + ' edges {\n' + ' node {\n' + ' ...collection\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment collection on Collection {\n' + ' handle\n' + ' title\n' + ' description\n' + ' image {\n' + ' altText\n' + ' url\n' + ' }\n' + ' seo {\n' + ' ...seo\n' + ' }\n' + ' updatedAt\n' + ' products(first: 100) {\n' + ' edges {\n' + ' node {\n' + ' id\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment seo on SEO {\n' + ' description\n' + ' title\n' + ' }\n' + '\n' + '\n' } ⨯ { cause: 'TypeError: Invalid URL', status: 500, message: 'Failed to parse URL from /api/2023-01/graphql.json', query: '\n' + ' query getCollectionProducts(\n' + ' $handle: String!\n' + ' $sortKey: ProductCollectionSortKeys\n' + ' $reverse: Boolean\n' + ' $filterCategoryProduct: [ProductFilter!]\n' + ' ) {\n' + ' collection(handle: $handle) {\n' + ' products(\n' + ' sortKey: $sortKey\n' + ' reverse: $reverse\n' + ' first: 100\n' + ' filters: $filterCategoryProduct\n' + ' ) {\n' + ' edges {\n' + ' node {\n' + ' ...product\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment product on Product {\n' + ' id\n' + ' handle\n' + ' availableForSale\n' + ' title\n' + ' description\n' + ' descriptionHtml\n' + ' options {\n' + ' id\n' + ' name\n' + ' values\n' + ' }\n' + ' priceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' minVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' compareAtPriceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' variants(first: 250) {\n' + ' edges {\n' + ' node {\n' + ' id\n' + ' title\n' + ' availableForSale\n' + ' selectedOptions {\n' + ' name\n' + ' value\n' + ' }\n' + ' price {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' compareAtPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' featuredImage {\n' + ' ...image\n' + ' }\n' + ' images(first: 20) {\n' + ' edges {\n' + ' node {\n' + ' ...image\n' + ' }\n' + ' }\n' + ' }\n' + ' seo {\n' + ' ...seo\n' + ' }\n' + ' tags\n' + ' updatedAt\n' + ' vendor\n' + ' collections(first: 100) {\n' + ' nodes {\n' + ' title\n' + ' products(first: 100) {\n' + ' edges {\n' + ' node {\n' + ' title\n' + ' vendor\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment image on Image {\n' + ' url\n' + ' altText\n' + ' width\n' + ' height\n' + ' }\n' + '\n' + ' \n' + ' fragment seo on SEO {\n' + ' description\n' + ' title\n' + ' }\n' + '\n' + '\n' } ⨯ [Error: Error: [object Object]] { digest: '3993220912' } ⨯ [Error: Error: [object Object]] { digest: '3993220912' } ⨯ [Error: Error: [object Object]] { digest: '3993220912' } ⨯ { cause: 'TypeError: Invalid URL', status: 500, message: 'Failed to parse URL from /api/2023-01/graphql.json', query: '\n' + ' query getCollectionProducts(\n' + ' $handle: String!\n' + ' $sortKey: ProductCollectionSortKeys\n' + ' $reverse: Boolean\n' + ' $filterCategoryProduct: [ProductFilter!]\n' + ' ) {\n' + ' collection(handle: $handle) {\n' + ' products(\n' + ' sortKey: $sortKey\n' + ' reverse: $reverse\n' + ' first: 100\n' + ' filters: $filterCategoryProduct\n' + ' ) {\n' + ' edges {\n' + ' node {\n' + ' ...product\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment product on Product {\n' + ' id\n' + ' handle\n' + ' availableForSale\n' + ' title\n' + ' description\n' + ' descriptionHtml\n' + ' options {\n' + ' id\n' + ' name\n' + ' values\n' + ' }\n' + ' priceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' minVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' compareAtPriceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' variants(first: 250) {\n' + ' edges {\n' + ' node {\n' + ' id\n' + ' title\n' + ' availableForSale\n' + ' selectedOptions {\n' + ' name\n' + ' value\n' + ' }\n' + ' price {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' compareAtPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' featuredImage {\n' + ' ...image\n' + ' }\n' + ' images(first: 20) {\n' + ' edges {\n' + ' node {\n' + ' ...image\n' + ' }\n' + ' }\n' + ' }\n' + ' seo {\n' + ' ...seo\n' + ' }\n' + ' tags\n' + ' updatedAt\n' + ' vendor\n' + ' collections(first: 100) {\n' + ' nodes {\n' + ' title\n' + ' products(first: 100) {\n' + ' edges {\n' + ' node {\n' + ' title\n' + ' vendor\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment image on Image {\n' + ' url\n' + ' altText\n' + ' width\n' + ' height\n' + ' }\n' + '\n' + ' \n' + ' fragment seo on SEO {\n' + ' description\n' + ' title\n' + ' }\n' + '\n' + '\n' } ⨯ { cause: 'TypeError: Invalid URL', status: 500, message: 'Failed to parse URL from /api/2023-01/graphql.json', query: '\n' + ' query getCollections {\n' + ' collections(first: 100, sortKey: TITLE) {\n' + ' edges {\n' + ' node {\n' + ' ...collection\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment collection on Collection {\n' + ' handle\n' + ' title\n' + ' description\n' + ' image {\n' + ' altText\n' + ' url\n' + ' }\n' + ' seo {\n' + ' ...seo\n' + ' }\n' + ' updatedAt\n' + ' products(first: 100) {\n' + ' edges {\n' + ' node {\n' + ' id\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment seo on SEO {\n' + ' description\n' + ' title\n' + ' }\n' + '\n' + '\n' } ⨯ { cause: 'TypeError: Invalid URL', status: 500, message: 'Failed to parse URL from /api/2023-01/graphql.json', query: '\n' + ' query getCollectionProducts(\n' + ' $handle: String!\n' + ' $sortKey: ProductCollectionSortKeys\n' + ' $reverse: Boolean\n' + ' $filterCategoryProduct: [ProductFilter!]\n' + ' ) {\n' + ' collection(handle: $handle) {\n' + ' products(\n' + ' sortKey: $sortKey\n' + ' reverse: $reverse\n' + ' first: 100\n' + ' filters: $filterCategoryProduct\n' + ' ) {\n' + ' edges {\n' + ' node {\n' + ' ...product\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment product on Product {\n' + ' id\n' + ' handle\n' + ' availableForSale\n' + ' title\n' + ' description\n' + ' descriptionHtml\n' + ' options {\n' + ' id\n' + ' name\n' + ' values\n' + ' }\n' + ' priceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' minVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' compareAtPriceRange {\n' + ' maxVariantPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' variants(first: 250) {\n' + ' edges {\n' + ' node {\n' + ' id\n' + ' title\n' + ' availableForSale\n' + ' selectedOptions {\n' + ' name\n' + ' value\n' + ' }\n' + ' price {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' compareAtPrice {\n' + ' amount\n' + ' currencyCode\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' featuredImage {\n' + ' ...image\n' + ' }\n' + ' images(first: 20) {\n' + ' edges {\n' + ' node {\n' + ' ...image\n' + ' }\n' + ' }\n' + ' }\n' + ' seo {\n' + ' ...seo\n' + ' }\n' + ' tags\n' + ' updatedAt\n' + ' vendor\n' + ' collections(first: 100) {\n' + ' nodes {\n' + ' title\n' + ' products(first: 100) {\n' + ' edges {\n' + ' node {\n' + ' title\n' + ' vendor\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' }\n' + ' \n' + ' fragment image on Image {\n' + ' url\n' + ' altText\n' + ' width\n' + ' height\n' + ' }\n' + '\n' + ' \n' + ' fragment seo on SEO {\n' + ' description\n' + ' title\n' + ' }\n' + '\n' + '\n' } ⨯ [Error: Error: [object Object]] { digest: '3993220912' } ⨯ [Error: Error: [object Object]] { digest: '3993220912' } ⨯ [Error: Error: [object Object]] { digest: '3993220912' }

millionstack avatar Oct 30 '24 15:10 millionstack

@millionstack It seems like there might be an issue with the API URL or authentication. Make sure the full URL is correctly formed, and check that your environment variables are correctly set. Let me know if you're still facing the issue!

tfmurad avatar Dec 28 '24 09:12 tfmurad

@millionstack, @tfmurad: I just added the same environment variables to the .env.example file but with the NEXT_PUBLIC_ prefix for the frontend. Your .env.example file should look like this:

SHOPIFY_API_SECRET_KEY="your-shopify-api-secret-key"
SHOPIFY_STOREFRONT_ACCESS_TOKEN="your-shopify-storefront-access-token"
SHOPIFY_STORE_DOMAIN="['your-domain'].myshopify.com"

NEXT_PUBLIC_SHOPIFY_API_SECRET_KEY="your-shopify-api-secret-key"
NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN="your-shopify-storefront-access-token"
NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN="['your-domain'].myshopify.com"

By adding NEXT_PUBLIC_ to the environment variables, this ensures that they can be accessed on the frontend side of your Next.js application. This should resolve the issue you were encountering.

OscarNavarr avatar May 10 '25 11:05 OscarNavarr