0

我已经使用 git 克隆了 pwa-studio 主题,但仍然无法运行 yarn install 之类的命令。尝试安装 node.js/npm 但无法安装,因为我在专用服务器上。我从哪里安装 pwa-studio 主题而没有任何错误以及如何安装?

4

1 回答 1

0

I hope this will help you,

You will see the pwa-studio directory in /var/www/html/mage0. Enter into this directoy:

cd pwa-studio/

Run

yarn install

Specify the Magento backend server in .env file.

cp packages/venia-concept/.env.dist packages/venia-concept/.env

Open this .env file and find MAGENTO_BACKEND_URL.

MAGENTO_BACKEND_URL="https://magento-2-local/" # your local path

Find the deployVeniaSampleData.sh file in /var/www/html/mage0/pwa-studio/packages/venia-concept/ directory. and copy this file in your Magento root directory. Now it must look like /var/www/html/mage0/deployVeniaSampleData.sh Now run:

bash deployVeniaSampleData.sh

After successful installation run:

bin/magento setup:upgrade bin/magento

indexer:reindex bin/magento

cache:flush

Now go back to pwa-studio directory /var/www/html/mage0/pwa-studio and start Server.

yarn run build or sudo yarn run build

Run server, Use any of the following commands from the project root directory to start the server:

yarn run watch:venia
yarn run watch:all
yarn run build && npm run stage:venia

Now browse the application, you will the application url on terminal like:

PWADevServer ready at https://magento-venia.local.pwadev:8001

Thanks,

于 2019-05-11T11:08:03.870 回答