Reputation: 75
I am now trying to setup Magento Venia Storefront and connect it to my Magento 2.3. I have referred to the following website to do so: https://magento.github.io/pwa-studio/venia-pwa-concept/setup/
yarn install
and installed the required packages. yarn buildpack create-custom-origin packages/venia-concept
Upon doing this, I am now getting the following error:
yarn run v1.21.1
$ buildpack create-custom-origin packages/venia-concept
ⓧ Missing required environment variables:
MAGENTO_BACKEND_URL: Connect to an instance of Magento 2.3 by specifying its public domain name. (eg. "https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/")
CHECKOUT_BRAINTREE_TOKEN: Specify a Braintree API token to direct the Venia storefront to communicate with your Braintree instance. You can find this value in Braintree's
Control Panel under Settings > API Keys > Tokenization Keys. (eg. "sandbox_8yrzsvtm_s2bg8fs563crhqzk")
ⓧ Error: Missing required environment variables:
MAGENTO_BACKEND_URL: Connect to an instance of Magento 2.3 by specifying its public domain name. (eg. "https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/")
CHECKOUT_BRAINTREE_TOKEN: Specify a Braintree API token to direct the Venia storefront to communicate with your Braintree instance. You can find this value in Braintree's
Control Panel under Settings > API Keys > Tokenization Keys. (eg. "sandbox_8yrzsvtm_s2bg8fs563crhqzk")
ⓧ Error: Error: Missing required environment variables:
MAGENTO_BACKEND_URL: Connect to an instance of Magento 2.3 by specifying its public domain name. (eg. "https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/")
CHECKOUT_BRAINTREE_TOKEN: Specify a Braintree API token to direct the Venia storefront to communicate with your Braintree instance. You can find this value in Braintree's
Control Panel under Settings > API Keys > Tokenization Keys. (eg. "sandbox_8yrzsvtm_s2bg8fs563crhqzk")
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
As for the first point, I can't find proper documentation as to how to configure Braintree while setting up Venia storefront. And for the second point, I am now running my Magento 2.3 locally and my admin panel only runs on Http.
Any help is appreciated, thank you in advance!
Upvotes: 1
Views: 2518
Reputation: 92
First Create your .env file if it is not build with the following command.
MAGENTO_BACKEND_URL="https://magento.local" yarn buildpack create-env-file packages/venia-concept
Now you can find the .env file in the packages/venia-concept/.env where you can set the MAGENTO_BACKEND_URL as your magento url.
If you will go through .env file then you will see that there is a field CHECKOUT_BRAINTREE_TOKEN=token which is commented out. Uncomment it and place the braintree token in it.
For the braintree token create sandbox account at https://www.braintreepayments.com/sandbox?_ga=1.114967554.428334232.1579331999
and then copy the token (private key) that you get after the account creating.
Hope It Helps !!
Upvotes: 2