saleor / saleor-storefront

A GraphQL-powered, NextJs-based, PWA storefront for Saleor. IMPORTANT: This project is [DEPRECATED] in favor of saleor/react-storefront soon to become our default demo and storefront starter pack.
https://demo.saleor.io/
BSD 3-Clause "New" or "Revised" License
768 stars 674 forks source link

Generating sitemap in production #759

Open PiotrLaszczyk opened 4 years ago

PiotrLaszczyk commented 4 years ago

What I'm trying to achieve

Generating sitemap in production

Steps to reproduce the problem

npm run sitemap https://www.AAA.BBB/

What happens

saleor-site@0.7.0 sitemap /home/piotr/git/webShopStorefront ts-node ./src/sitemap-builder.ts "https://www.AAA.BBB/"

(node:16557) UnhandledPromiseRejectionWarning: **Error: Network error: only absolute urls are supported**
    at new ApolloError (/home/piotr/git/webShopStorefront/node_modules/apollo-client/bundle.esm.js:60:28)
    at QueryManager.<anonymous> (/home/piotr/git/webShopStorefront/node_modules/apollo-client/bundle.esm.js:1184:45)
    at step (/home/piotr/git/webShopStorefront/node_modules/tslib/tslib.js:133:27)
    at Object.next (/home/piotr/git/webShopStorefront/node_modules/tslib/tslib.js:114:57)
    at /home/piotr/git/webShopStorefront/node_modules/tslib/tslib.js:107:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/home/piotr/git/webShopStorefront/node_modules/tslib/tslib.js:103:16)
    at /home/piotr/git/webShopStorefront/node_modules/apollo-client/bundle.esm.js:1147:77
    at /home/piotr/git/webShopStorefront/node_modules/apollo-client/bundle.esm.js:1627:17
    at Array.forEach (<anonymous>)
(node:16557) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:16557) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I was looking for solution to create sitemap in production and it looks like something is partially implemented... but how it works? dbase state is changing constantly... new products, categories... so it should be executed frequently. Informations about conifgurations are in saleor and information about urls in storefront.. is this really working now?

Sarowar-neo commented 4 years ago

Same issue :( (node:14569) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:14569) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

siphon-app commented 2 years ago

has anyone figured this out?