5

I managed to run Venia frontend however facing the same issue. I have installed PWA venia in frontend magento 2.3.1 but images are not loading. Here are the comments to your questions. Please Help with your suggestions

Magento version : 2.3.1

Operating System + version: Ubuntu Linux 16.04

node.js version (node -v): v10.15.3

Yarn Version: 1.15.2

Note: Yes, Images are loading in local instance.

file / folder permissions yes

My instance is running on HTTPS

Please check the screenshot.

enter image description here

enter image description here

2

1)First, create a virtual host for your Magento root directory. If you don't know how to set up virtual host please follow the link: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts

Next, you need to edit the file named makeMediaPath.js which is placed in the path

pwa-studio-release/packages/venia-concept/src/util/makeMediaPath.js

Now change the following line

const mediaPath = 'http://magento23.com/pub/media/catalog';

In the above line please replace magento23.com with your virtual host

OR

2) And also you can change the /pwa-studio/packages/venia-concept/.env file with

MAGENTO_BACKEND_URL="http://magento23.com/magento_folder/pub"

In the above line please replace magento23.com with your virtual host

then run yarn run build

and yarn run watch:venia

  • not find makeMediaPath.js in pwa-studio/packages/venia-concept/src/util/makeMediaPath.js – Savan Patel Apr 29 at 9:57
  • Savan Patel go with the option 2 that works fine for me – hemasharma27 Apr 29 at 10:05
  • yarn run build get error ⚠ GraphQL Error (Code: 404): {"response":{"error":"<!DOCTYPE HTML PUBLIC – Savan Patel Apr 29 at 10:06
  • Have you updated you magento_root_directory name instead of magento_folder – hemasharma27 Apr 29 at 10:09
  • yes updated already – Savan Patel Apr 29 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.