TransWikia.com

MAC OS Magento 2.4.1. PWA Studio 8.0.0 Local Setup Steps and Bugfix

Magento Asked by RishiMukesh on December 19, 2020

MAC OS Magento 2 setup

NVM INSTALLTION

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

vim .zshrc

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"

Reload the shell configuration by using the following command

source ~/.zshrc

nvm install v12.18.0

nvm use v12.18.0

nvm alias default 10.16.3

brew install nginx
brew install php@74 
brew install mysql

composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition=2.3.3 /usr/local/var/www/html/

php bin/magento sampledata:deploy

php bin/magento setup:install 
--base-url=https://m2pwa.local 
--db-host=localhost 
--db-name=m2pwa 
--db-user=root 
--db-password=password 
--admin-firstname=fn 
--admin-lastname=ln 
[email protected] 
--admin-user=admin 
--admin-password=***** 
--language=en_US 
--currency=USD 
--timezone=America/Chicago 
--use-rewrites=1

php bin/magento maintenance:disable

php bin/magento s:up && php bin/magento s:di:c && php bin/magento s:s:d -f

mkcert "*.m2pwa.local" m2pwa.local

Magento Admin and Frontend is ready with sample data and SSL

git clone --branch v8.0.0 https://github.com/magento/pwa-studio.git

cd pwa-stdio 

yarn install 

yarn buildpack create-project ./packages/pwa-sample --template "venia-concept" --name "pwa-sample" --author "username<[email protected]>"  --backend-url "https://pwabackend.demo.ubertheme.com/" --braintree-token "sandbox_rzknz7v7_dbw5pyvbpn4bwhw9" --npm-client "yarn" 

 Open the file pwa-studio/package.json and find the lines:

"packages/venia-ui"
and replace it with:

"packages/venia-ui",
"packages/pwa-sample"

next step is to add a new run script for your custom PWA project in the same package.json file:

Find:

"venia": "node ./packages/pwa-buildpack/bin/buildpack load-env ./packages/venia-concept && yarn workspace @magento/venia-concept",
Replace it with:

"venia": "node ./packages/pwa-buildpack/bin/buildpack load-env ./packages/venia-concept && yarn workspace @magento/venia-concept",
"pwa-sample": "node ./packages/pwa-buildpack/bin/buildpack load-env ./packages/pwa-sample && yarn workspace pwa-sample", 

yarn run buildpack create-custom-origin packages/pwa-sample/

yarn pwa-sample build

yarn pwa-sample watch

yarn pwa-sample start

enter image description here
enter image description here

Compiled Successfully . But why getRouteComponent.js 404 error. Please help

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP