cancel
Showing results for 
Search instead for 
Did you mean: 

Error While Install Magento 2 store PWA in Ubuntu

Error While Install Magento 2 store PWA in Ubuntu

Hi All,

 

https://magento-research.github.io/pwa-studio/venia-pwa-concept/setup/

 

AWS t2.micro version is been used for setup, though store front is getting rendered properly issue is while doing PWA setup.

 

OS: Ubuntu 18.04 version during "Yarn run build" Process just gets hang up with below step.

 

" 92% chunk asset optimization TerserPlugin"

0ms advanced chunk modules optimization
1ms after chunk modules optimization
1ms module reviving
8ms module order optimization
0ms advanced module order optimization
0ms before module ids
3ms module ids
12ms module id optimization
1ms chunk reviving
1ms chunk order optimization
0ms before chunk ids
2ms chunk id optimization
11ms after chunk id optimization
1ms record modules
2ms record chunks
57ms hashing
21ms content hashing
1ms after hashing
0ms record hash
1ms module assets processing
695ms chunk assets processing
10ms additional chunk assets processing
1ms recording
1ms additional asset processing

" 92% chunk asset optimization TerserPlugin"

 

2. While doing veniadata setup getting following error

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 545267712) (tried to allocate 147456 bytes) in /usr/share/php/Composer/DependencyResolver/RuleSetGenerator.php on line 193

 

Please advise

 

Thanks in advance.

9 REPLIES 9

Re: Error While Install Magento 2 store PWA in Ubuntu

Hello @magentodev2019 

 

You will require to increase the memory_limit parameter value from the php.ini file !

 

Kindly find the php.ini file from your system and increase its value to at least memory_limit=1G

 

so it will resolved your issue !

if issue solved,Click Kudos & Accept as Solution

Re: Error While Install Magento 2 store PWA in Ubuntu

Hello @magentodev2019 

 

seems like memory limit issue, you need to change memory limit -1 for composer

 

below blog will be helpful for you

https://getcomposer.org/doc/articles/troubleshooting.md


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Error While Install Magento 2 store PWA in Ubuntu

Thanks @Sunil Patel and @Manthan Dave  for your reply

 

I have increased memory limit to 1G in php.ini and was able to do run build (was successful)  

 

However , as a next step when i try to run "yarn run watch:venia"  Process got hanged up for say 10 mins in below step

 

yarn run v1.15.2
$ yarn workspace @magento/venia-concept run watch; cd - >/dev/null

 

even when i try to run my frontend it was hung.

 

Can you pls advice on this.

Re: Error While Install Magento 2 store PWA in Ubuntu

I manged to solve the previous issue and PWA server is up and running , however am not able to access public via browser.   (though frontend is ok, but PWA alone cannot be accessed via port 8971)  . thanks @Manthan Dave @Sunil Patel 

 

Below link didnt help much.

 

https://magento.stackexchange.com/questions/257243/pwa-setup-with-magento2-3

 

2. i have added my IP address in local host against PWA site   "https://support.rackspace.com/how-to/modify-your-hosts-file/"

 

instead of 127.0.0.1 against localpwa site, i made change to point IP address same as front end domain IP.

 

however still not accessible, when i tried to do a curl via AWS Box getting connection refused.

curl: (7) Failed to connect to magento-venia-concept-xxxxxx.local.pwadev port 8971: Connection refused

 

in my inbound rules, i have activated http 80, https 443 as well.

 

 

can someone pls advice?

 

Re: Error While Install Magento 2 store PWA in Ubuntu

Hello @magentodev2019 

 

you need to do port forward local system to the server

 

ssh -L 35729:127.0.0.1:35729 ubuntu@ip_address of host

where 35729 it is your pwa port

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Error While Install Magento 2 store PWA in Ubuntu

hello Sunil.

 

1. I had changed in /etc/host to map my local pwa site against my AWS IP Address, should i need to retain it as 127.0.0.1 or should i update my host file with AWS IP

 

2. my PWA Ready server runs at 8971

 

so as per your above suggestion i tried 

ssh -L 8971:127.0.0.1:8971 ubuntu@3.x.x.x (my IP at AWS)

 

The authenticity of host '3.x.x.x' can't be established.
ECDSA key fingerprint is SHA256:xxxx
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '3.x.x.x' (ECDSA) to the list of known hosts.
ubuntu@3.x.x.x: Permission denied (publickey).

 

still it didnt work, am i missing anything

 

3. i tried to do a curl from AWS box still it says connection refused.

curl: (7) Failed to connect to magento-venia-concept-xxxxx.local.pwadev port 8971: Connection refused

 

@Sunil Patel 

Re: Error While Install Magento 2 store PWA in Ubuntu

hello Sunil.

 

thanks for ur reply.

 

1. Previously I had changed entries in /etc/host to map my local pwa site against my AWS IP Address, should i need to retain it as 127.0.0.1 or should i update my host file with AWS IP

i.e.

127.0.0.1  pwasitelocal --  changed to  >>>>> 3.x.x.x  pwasitelocal

 

2. my PWA Ready server runs at 8971

 

so as per your above suggestion i tried 

ssh -L 8971:127.0.0.1:8971 ubuntu@3.x.x.x (my IP at AWS)

 

The authenticity of host '3.x.x.x' can't be established.
ECDSA key fingerprint is SHA256:xxxx
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '3.x.x.x' (ECDSA) to the list of known hosts.
ubuntu@3.x.x.x: Permission denied (publickey).

 

still it didnt work, am i missing anything

 

if i do portforward to 80, then i think my frontend site wont work.

 

3. i tried to do a curl from AWS box still it says connection refused.

curl: (7) Failed to connect to magento-venia-concept-xxxxx.local.pwadev port 8971: Connection refused

 

@Sunil Patel 

Re: Error While Install Magento 2 store PWA in Ubuntu

Hell @magentodev2019 

 

magento-venia-concept-xxxxx.local.pwadev

you need to host into your local pc

 

ssh -L 8971:127.0.0.1:8971 ubuntu@3.x.x.x (my IP at AWS)

 

make sure before you added ssh key to connect, otherwise change to password based ssh connect


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Error While Install Magento 2 store PWA in Ubuntu

Hello sunil,

 

is there any way to configure and run PWA from AWS by making it public instead of local pc?

like how front end is accessed , am trying to access PWA site same way over public via broswer.

 

@Sunil Patel