Domanda

what I have:

  • OS Windows 7
  • PHP Version 7.1.22
  • NodeJS 10.14.2
  • Yarn 1.13.0

I use instruction from https://webkul.com/blog/magento2-3-pwa-studio-setup/ and https://magento-research.github.io/pwa-studio/venia-pwa-concept/setup/

So, what I did:

  • installed fresh magento 2.3 from composer via command composer create-project --repository=https://repo.magento.com/ magento/project-community-edition:2.3.0 f:\OSPanel\domains\m2pwa2.local\
  • cloned pwa-studio (git clone https://github.com/magento-research/pwa-studio.git) into magento instance: f:\OSPanel\domains\m2pwa2.local\pwa-studio
  • cd pwa-studio and run yarn install
  • set MAGENTO_BACKEND_URL="http://m2pwa2.local/" in f:\OSPanel\domains\m2pwa2.local\pwa-studio\packages\venia-concept\.env
  • installed sample data of venia-theme

When I go to f:\OSPanel\domains\m2pwa2.local\pwa-studio\ and run yarn run build I see:

f:\OSPanel\domains\m2pwa2.local\pwa-studio>node -v
v10.14.2

f:\OSPanel\domains\m2pwa2.local\pwa-studio>yarn -v
1.13.0

f:\OSPanel\domains\m2pwa2.local\pwa-studio>yarn run build
yarn run v1.13.0
$ yarn workspaces run build
$ concurrently --raw yarn:build:cjs yarn:build:esm
$ BABEL_ENV=production babel src --out-dir dist --root-mode 'upward' --source-ma
ps
$ BABEL_ENV=development babel src --out-dir esm --root-mode 'upward' --source-ma
ps
'BABEL_ENV' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this comm
and.
'BABEL_ENV' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this comm
and.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this comm
and.
error Command failed.
Exit code: 1
Command: C:\Program Files\nodejs\node.exe
Arguments: C:\Program Files (x86)\Yarn\lib\cli.js build
Directory: f:\OSPanel\domains\m2pwa2.local\pwa-studio\packages\peregrine
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about th
is command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this comm
and.

f:\OSPanel\domains\m2pwa2.local\pwa-studio>

enter image description here

I would appreciate any help!

È stato utile?

Soluzione

It is because windows does not support Magento PWA studio. Please use Linux subsystem for windows to install it.

Altri suggerimenti

@Nadh

Step 1. you need to install Vagrant + VirtualBox on windows

Step 2. you need to install Ubuntu into Vagrant. I use https://app.vagrantup.com/bento/boxes/ubuntu-18.04

Step 3. Install Apache + PHP + MySQL into Ubunto: https://www.taniarascia.com/how-to-install-apache-php-7-1-and-mysql-on-ubuntu-with-vagrant/

Step 4. Install Magento 2.3.x (without sample data) https://magento.github.io/pwa-studio/venia-pwa-concept/setup/

Step 5. Add Venia sample data https://magento.github.io/pwa-studio/venia-pwa-concept/install-sample-data/

Step 6. Clone the PWA Studio repository

Step 7. Run PWA into Vagrant and Ubunto

So, you don't need to use windows. Everything will works into Vagrant + Ubunto on your windows machine.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top