Closed willopez closed 3 years ago
@willopez thanks for reporting! Could you check whether shopwareEndpoint
in your shopware-pwa.config.js
contains a trailing /
? If so, try removing it and re-initialising.
Dom
Hi @willopez!
First of all - I am able to run a local version of shopware-pwa with your API, so it is working perfectly fine.
Let my try to clarify:
shopwareEndpoint
is the URL which all API requests paths are built made relative to. It has nothing to with the domain configuration of your sales channel. A good indication is the URL of your admin panel. In your case it is located at https://pwa-api.willopez.com/admin
. Hence, the root path of your Shopware instance - the shopwareEndpoint
is https://pwa-api.willopez.com
(without a trailing /
)
shopwareAccessToken
is used to identify the sales channel for your PWA
pwaHost
is the URL relative to which you want your frontend application to do the routing. It is tied to the domain configuration of your sales channel. If your sales channel has only a single configured domain (which CAN be the same as shopwareEndpoint
, but by no means has to), set pwaHost
to the same value (again without trailing /
).
If however, you're going to configure multiple domains (which in Shopware wording can also mean suffixes rather than just domains) like
https://pwa-frontend.willopez.com/us
https://pwa-frontend.willopez.com/gb
https://pwa-frontend.willopez.com/whatever
they would share the common pwaHost
which in that case would be https://pwa-frontend.willopez.com
. The shopwareEndpoint
in that case would remain the same as before.
Try the following configuration for shopware-pwa.config.js
, it worked for me
module.exports = {
shopwareEndpoint: "https://pwa-api.willopez.com",
shopwareAccessToken: "SWSCYTV6VLPJQNVUCENOQNO5QW",
pwaHost: "https://pwa-api.willopez.com",
};
PS: You should be able to join the slack channel without an explicit invitation (we will remove the old one from the README) - VSF Slack Channel
@elkmod Got it, I was just confused as to the mapping of the domains, everything is working now. Thanks! and great work on this project.
Describe the bug
I followed the instructions on installing the pwa canary version and I get the following error when executing this command:
npx @shopware-pwa/cli@canary init
Error:
Not sure what the
UNEXPECTED ERROR [object Object]
is, but the end results is that thedomains.json
is an empty object and thelanguages.json
seems to be populated correctly:The app fails to start.
In the Shopware instance access logs I see the following 500 error
Additional context
Using:
shopware-pwa/shopware-pwa 2.0
Shopware 6.3.5.0