{"id":3662,"date":"2019-02-28T02:23:09","date_gmt":"2019-02-28T02:23:09","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=3662"},"modified":"2019-07-22T04:10:34","modified_gmt":"2019-07-22T04:10:34","slug":"install-vue-storefront-on-ubuntu-16-04","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2019\/02\/28\/install-vue-storefront-on-ubuntu-16-04\/","title":{"rendered":"Install Vue Storefront On Ubuntu 16.04"},"content":{"rendered":"<p>Ref: https:\/\/docs.vuestorefront.io\/guide\/installation\/linux-mac.html#requirements<br \/>\nhttps:\/\/medium.com\/the-vue-storefront-journal\/vue-storefront-how-to-install-and-integrate-with-magento2-227767dd65b2<\/p>\n<p>Requirements<br \/>\n&#8211; Docker (with\u00a0docker-compose\u00a0installed).<br \/>\nAlready included in\u00a0vue-storefront\u00a0and\u00a0vue-storefront-api\u00a0Docker images (required locally, if you do not use containerization):<br \/>\n&#8211; Node.js\u00a0Active LTS\u00a0(&gt;=8.0.0)<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~$ nvm use 10.15.1\r\nNow using node v10.15.1 (npm v6.4.1)\r\nteddy@teddy:~$ node -v\r\nv10.15.1<\/pre>\n<p>&#8211; Yarn\u00a0(&gt;=1.0.0)<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~$ yarn -v\r\n1.13.0<\/pre>\n<p>&#8211; ImageMagick\u00a0(to fit, resize and crop images)<\/p>\n<p>First, Install Docker CE for ubuntu (https:\/\/docs.docker.com\/install\/linux\/docker-ce\/ubuntu\/#install-using-the-repository)<\/p>\n<p>Install using the repository<br \/>\nBefore you install Docker CE for the first time on a new host machine, you need to set up the Docker repository. Afterward, you can install and update Docker from the repository.<\/p>\n<p>SET UP THE REPOSITORY<br \/>\nUpdate the\u00a0apt\u00a0package index:<\/p>\n<pre class=\"lang:default decode:true \">$ sudo apt-get update<\/pre>\n<p>Install packages to allow\u00a0apt\u00a0to use a repository over HTTPS:<\/p>\n<pre class=\"lang:default decode:true\">$ sudo apt-get install \\\r\n    apt-transport-https \\\r\n    ca-certificates \\\r\n    curl \\\r\n    gnupg-agent \\\r\n    software-properties-common<\/pre>\n<p>Add Docker\u2019s official GPG key:<\/p>\n<pre class=\"lang:default decode:true\">$ curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo apt-key add -<\/pre>\n<p>Verify that you now have the key with the fingerprint9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.<\/p>\n<pre class=\"lang:default decode:true\">teddy@teddy:~\/Documents\/works$ sudo apt-key fingerprint 0EBFCD88\r\npub   4096R\/0EBFCD88 2017-02-22\r\n      Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88\r\nuid                  Docker Release (CE deb) &lt;docker@docker.com&gt;\r\nsub   4096R\/F273FCD8 2017-02-22<\/pre>\n<p>Use the following command to set up the\u00a0stable\u00a0repository.<\/p>\n<pre class=\"lang:default decode:true\">$ sudo add-apt-repository \\\r\n   \"deb [arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu \\\r\n   $(lsb_release -cs) \\\r\n   stable\"<\/pre>\n<p>INSTALL DOCKER CE<br \/>\nUpdate the\u00a0apt\u00a0package index.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo apt-get update<\/pre>\n<p>Install the\u00a0latest version\u00a0of Docker CE and containerd, or go to the next step to install a specific version:<\/p>\n<pre class=\"lang:default decode:true\">$ sudo apt-get install docker-ce docker-ce-cli containerd.io<\/pre>\n<p>Verify that Docker CE is installed correctly by running the\u00a0hello-world\u00a0image.<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works$ sudo docker run hello-world\r\nUnable to find image 'hello-world:latest' locally\r\nlatest: Pulling from library\/hello-world\r\n1b930d010525: Pull complete \r\nDigest: sha256:2557e3c07ed1e38f26e389462d03ed943586f744621577a99efb77324b0fe535\r\nStatus: Downloaded newer image for hello-world:latest\r\n\r\nHello from Docker!\r\nThis message shows that your installation appears to be working correctly.\r\n\r\nTo generate this message, Docker took the following steps:\r\n 1. The Docker client contacted the Docker daemon.\r\n 2. The Docker daemon pulled the \"hello-world\" image from the Docker Hub.\r\n    (amd64)\r\n 3. The Docker daemon created a new container from that image which runs the\r\n    executable that produces the output you are currently reading.\r\n 4. The Docker daemon streamed that output to the Docker client, which sent it\r\n    to your terminal.\r\n\r\nTo try something more ambitious, you can run an Ubuntu container with:\r\n $ docker run -it ubuntu bash\r\n\r\nShare images, automate workflows, and more with a free Docker ID:\r\n https:\/\/hub.docker.com\/\r\n\r\nFor more examples and ideas, visit:\r\n https:\/\/docs.docker.com\/get-started\/<\/pre>\n<p>This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.<br \/>\nCheck docker version: (https:\/\/docs.docker.com\/engine\/reference\/commandline\/cli\/)<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works$ sudo docker -v\r\nDocker version 18.09.2, build 6247962<\/pre>\n<p>Docker CE is installed and running. The\u00a0docker\u00a0group is created but no users are added to it. You need to use\u00a0sudo\u00a0to run Docker commands. Continue to\u00a0Linux postinstall\u00a0to allow non-privileged users to run Docker commands and for other optional configuration steps.<\/p>\n<p>It&#8217;s important to manage docker for non-root user (https:\/\/docs.docker.com\/install\/linux\/linux-postinstall\/)<br \/>\nCreate the\u00a0docker\u00a0group.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo groupadd docker<\/pre>\n<p>Add your user to the\u00a0docker\u00a0group.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo usermod -aG docker $USER<\/pre>\n<p>Logout and re-login \u00a0so that your group membership is re-evaluated.<br \/>\nVerify that you can run\u00a0docker\u00a0commands without\u00a0sudo.<\/p>\n<pre class=\"lang:default decode:true\">$ docker run hello-world<\/pre>\n<pre class=\"lang:default decode:true \">teddy@teddy:~$ docker run hello-world\r\n\r\nHello from Docker!\r\nThis message shows that your installation appears to be working correctly.\r\n\r\nTo generate this message, Docker took the following steps:\r\n 1. The Docker client contacted the Docker daemon.\r\n 2. The Docker daemon pulled the \"hello-world\" image from the Docker Hub.\r\n    (amd64)\r\n 3. The Docker daemon created a new container from that image which runs the\r\n    executable that produces the output you are currently reading.\r\n 4. The Docker daemon streamed that output to the Docker client, which sent it\r\n    to your terminal.\r\n\r\nTo try something more ambitious, you can run an Ubuntu container with:\r\n $ docker run -it ubuntu bash\r\n\r\nShare images, automate workflows, and more with a free Docker ID:\r\n https:\/\/hub.docker.com\/\r\n\r\nFor more examples and ideas, visit:\r\n https:\/\/docs.docker.com\/get-started\/<\/pre>\n<p>&nbsp;<\/p>\n<p>Install Docker Compose<br \/>\nhttps:\/\/docs.docker.com\/compose\/install\/<br \/>\nOn\u00a0Linux, you can download the Docker Compose binary from the\u00a0Compose repository release page on GitHub. Follow the instructions from the link, which involve running the\u00a0curl\u00a0command in your terminal to download the binaries. These step by step instructions are also included below. To ensure you have the latest version, check the\u00a0Compose repository release page on GitHub.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo curl -L \"https:\/\/github.com\/docker\/compose\/releases\/download\/1.23.2\/docker-compose-$(uname -s)-$(uname -m)\" -o \/usr\/local\/bin\/docker-compose<\/pre>\n<p>Apply executable permissions to the binary:<\/p>\n<pre class=\"lang:default decode:true \">$ sudo chmod +x \/usr\/local\/bin\/docker-compose<\/pre>\n<p>Test the installation.<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~$ docker-compose --version\r\ndocker-compose version 1.23.2, build 1110ad01<\/pre>\n<p>For installing ImageMagic for Ubuntu 16.04, PHP7.2-FPM and NGINX. pls see http:\/\/www.mariorodriguez.co\/2018\/01\/17\/install-enable-imagick-on-ubuntu-16.04.html and https:\/\/askubuntu.com\/questions\/769396\/how-to-install-imagemagick-for-php7-on-ubuntu<\/p>\n<pre class=\"lang:default decode:true\">teddy@teddy:~$ sudo apt-get install php-imagick\r\nteddy@teddy:~$ php -m | grep imagick\r\nimagick\r\nteddy@teddy:~$ sudo gedit \/etc\/php\/7.0\/fpm\/php.ini<\/pre>\n<p>In \/etc\/php\/7.0\/fpm\/php.ini file, insert &#8216;extension=imagick.so&#8217; line. then save.<br \/>\nRestart php7.2-fpm and nginx<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~$ sudo service php7.2-fpm reload\r\nteddy@teddy:~$ sudo service nginx restart<\/pre>\n<p>Check the extension in phpinfo (http:\/\/localhost:8080\/phpinfo.php)<\/p>\n<p>Installation Vue StoreFront<\/p>\n<p>To get started\u200a\u2014\u200afirst of all we need to install all projects on your local machine. Fortunately it\u2019s very simple step because we do have\u00a0CLI installer which installs\u00a0vue-storefront\u00a0and\u00a0vue-storefront-api\u00a0altogether.<\/p>\n<p>First step\u00a0is to get the VS from our github:<\/p>\n<p>git clone\u00a0https:\/\/github.com\/DivanteLtd\/vue-storefront.git\u00a0vue-storefront<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works$ git clone https:\/\/github.com\/DivanteLtd\/vue-storefront.git vue-storefront\r\nCloning into 'vue-storefront'...\r\nremote: Enumerating objects: 278, done.\r\nremote: Counting objects: 100% (278\/278), done.\r\nremote: Compressing objects: 100% (147\/147), done.\r\nremote: Total 53218 (delta 145), reused 239 (delta 131), pack-reused 52940\r\nReceiving objects: 100% (53218\/53218), 36.88 MiB | 49.00 KiB\/s, done.\r\nResolving deltas: 100% (34882\/34882), done.\r\nChecking connectivity... done.<\/pre>\n<p>Go to the &#8216;vue-storefront&#8217; directory<\/p>\n<pre class=\"lang:default decode:true\">teddy@teddy:~$ cd Documents\/works\/vue-storefront\/<\/pre>\n<pre class=\"lang:default decode:true\">teddy@teddy:~\/Documents\/works\/vue-storefront$ yarn\r\nyarn install v1.13.0\r\n[1\/5] Validating package.json...\r\n[2\/5] Resolving packages...\r\n[3\/5] Fetching packages...\r\ninfo There appears to be trouble with your network connection. Retrying...\r\ninfo fsevents@1.2.4: The platform \"linux\" is incompatible with this module.\r\ninfo \"fsevents@1.2.4\" is an optional dependency and failed compatibility check. Excluding it from installation.\r\n[4\/5] Linking dependencies...\r\nwarning \" &gt; karma-webpack@3.0.5\" has incorrect peer dependency \"webpack@^2.0.0 || ^3.0.0\".\r\n[5\/5] Building fresh packages...\r\nDone in 96.86s.<\/pre>\n<p>MAKE SURE YOU CHECK PORT 8080 (USUALLY IT BEING USED BY NGINX) BY &#8216;sudo netstat -plntu&#8217;. IF THE PORT IS BEING USED BY NGINX, PLS STOP IT FIRST &#8216;sudo service nginx stop&#8217;. PORT 8080 WOULD BE USED BY MAGENTO 2 BACKEND???<br \/>\nMAKE SURE YOU ALREADY ADD USER FOR DOCKER<br \/>\n&lt;ERROR_YARN_INSTALLER_DOCKER_NON_ROOT&gt;<\/p>\n<pre class=\"lang:default decode:true\">teddy@teddy:~\/Documents\/works\/vue-storefront$ yarn installer\r\nyarn run v1.13.0\r\n$ node .\/core\/scripts\/installer\r\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 Hi, welcome to the vue-storefront installation. \u2502\r\n\u2502 Let's configure it together :)                  \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\r\n\r\n? Would you like to use https:\/\/demo.vuestorefront.io as the backend? No\r\n? Please provide Git path (if it's not globally installed) git\r\n? Please provide path for installing backend locally ..\/vue-storefront-api\r\n? Choose path for images endpoint http:\/\/localhost:8080\/img\/\r\n? Please provide your magento url http:\/\/demo-magento2.vuestorefront.io\r\n? Would You like to perform initial data import from Magento2 instance? No\r\n\r\n Trying to create log files... \r\n\r\n Cloning backend into '..\/vue-storefront-api'... \r\n\r\n Trying change directory to '..\/vue-storefront-api'... \r\n\r\n Working in directory '\/home\/teddy\/Documents\/works\/vue-storefront-api'... \r\n\r\n Installing backend npm... \r\n\r\n Creating backend config 'config\/local.json'... \r\n\r\n Starting docker in background... \r\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 ERROR                                                                                                        \u2502\r\n\u2502                                                                                                              \u2502\r\n\u2502 Error: Can't start docker in background.                                                                     \u2502\r\n\u2502     at Promise (\/home\/teddy\/Documents\/works\/vue-storefront\/core\/scripts\/installer.js:198:16)                 \u2502\r\n\u2502     at new Promise (&lt;anonymous&gt;)                                                                             \u2502\r\n\u2502     at Backend.dockerComposeUp (\/home\/teddy\/Documents\/works\/vue-storefront\/core\/scripts\/installer.js:194:12) \u2502\r\n\u2502                                                                                                              \u2502\r\n\u2502 Please check log file for details: \/home\/teddy\/Documents\/works\/vue-storefront\/var\/log\/install.log            \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\r\n\r\nerror Command failed with exit code 1.\r\ninfo Visit https:\/\/yarnpkg.com\/en\/docs\/cli\/run for documentation about this command.<\/pre>\n<p>SOLUTION: ADD USER FOR DOCKER. SEE THE ABOVE REVISED DOCKER INSTALL!<br \/>\n&lt;\/ERROR_YARN_INSTALLER_DOCKER_NON_ROOT&gt;<br \/>\nRUN &#8216;yarn build&#8217; BEFORE &#8216;yarn installer&#8217;. DONT FORGET REMOVE &#8216;vue-storefront-api&#8217; DIRECTORY<\/p>\n<pre class=\"lang:default decode:true\">teddy@teddy:~\/Documents\/works\/vue-storefront$ yarn build<\/pre>\n<p>&lt;ERROR_YARN_INSTALLER_STOREFRONT_NPM&gt;<\/p>\n<pre class=\"lang:default decode:true\">teddy@teddy:~\/Documents\/works\/vue-storefront$ yarn installer\r\nyarn run v1.12.3\r\n$ node .\/core\/scripts\/installer\r\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 Hi, welcome to the vue-storefront installation. \u2502\r\n\u2502 Let's configure it together :)                  \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\r\n\r\n? Would you like to use https:\/\/demo.vuestorefront.io as the backend? No\r\n? Please provide Git path (if it's not globally installed) git\r\n? Please provide path for installing backend locally ..\/vue-storefront-api\r\n? Choose path for images endpoint http:\/\/localhost:8080\/img\/\r\n? Please provide your magento url http:\/\/demo-magento2.vuestorefront.io\r\n? Would You like to perform initial data import from Magento2 instance? No\r\n\r\n Trying to create log files... \r\n\r\n Cloning backend into '..\/vue-storefront-api'... \r\n\r\n Trying change directory to '..\/vue-storefront-api'... \r\n\r\n Working in directory '\/home\/teddy\/Documents\/works\/vue-storefront-api'... \r\n\r\n Installing backend npm... \r\n\r\n Creating backend config 'config\/local.json'... \r\n\r\n Starting docker in background... \r\n\r\n\r\n Restoring data for ElasticSearch... \r\n\r\n Migrating data into ElasticSearch... \r\n\r\n Cloning Magento 2 Sample Data into 'var\/magento2-sample-data'... \r\n\r\n Starting backend server... \r\n\r\n Trying change directory to '\/home\/teddy\/Documents\/works\/vue-storefront'... \r\n\r\n Working in directory '\/home\/teddy\/Documents\/works\/vue-storefront'... \r\n\r\n Creating storefront config 'config\/local.json'... \r\n\r\n Build storefront npm... \r\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 ERROR                                                                                                    \u2502\r\n\u2502                                                                                                          \u2502\r\n\u2502 Error: Can't build storefront npm.                                                                       \u2502\r\n\u2502     at Promise (\/home\/teddy\/Documents\/works\/vue-storefront\/core\/scripts\/installer.js:478:16)             \u2502\r\n\u2502     at new Promise (&lt;anonymous&gt;)                                                                         \u2502\r\n\u2502     at Storefront.npmBuild (\/home\/teddy\/Documents\/works\/vue-storefront\/core\/scripts\/installer.js:474:12) \u2502\r\n\u2502     at &lt;anonymous&gt;                                                                                       \u2502\r\n\u2502                                                                                                          \u2502\r\n\u2502 Please check log file for details: \/home\/teddy\/Documents\/works\/vue-storefront\/var\/log\/install.log        \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\r\n\r\nerror Command failed with exit code 1.\r\ninfo Visit https:\/\/yarnpkg.com\/en\/docs\/cli\/run for documentation about this command.<\/pre>\n<p>SOLUTION: https:\/\/docs.vuestorefront.io\/guide\/basics\/recipes.html#how-to-prevent-an-error-can%E2%80%99t-build-storefront-npm<br \/>\nRUN: &#8216;yarn build&#8217; BEFORE &#8216;yarn installer&#8217;.<br \/>\n&lt;\/ERROR_YARN_INSTALLER_STOREFRONT_NPM&gt;<br \/>\nWORKING!<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works\/vue-storefront$ yarn installer\r\nyarn run v1.12.3\r\n$ node .\/core\/scripts\/installer\r\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 Hi, welcome to the vue-storefront installation. \u2502\r\n\u2502 Let's configure it together :)                  \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\r\n\r\n? Would you like to use https:\/\/demo.vuestorefront.io as the backend? No\r\n? Please provide Git path (if it's not globally installed) git\r\n? Please provide path for installing backend locally ..\/vue-storefront-api\r\n? Choose path for images endpoint http:\/\/localhost:8080\/img\/\r\n? Please provide your magento url http:\/\/demo-magento2.vuestorefront.io\r\n? Would You like to perform initial data import from Magento2 instance? No\r\n\r\n Trying to create log files... \r\n\r\n Cloning backend into '..\/vue-storefront-api'... \r\n\r\n Trying change directory to '..\/vue-storefront-api'... \r\n\r\n Working in directory '\/home\/teddy\/Documents\/works\/vue-storefront-api'... \r\n\r\n Installing backend npm... \r\n\r\n Creating backend config 'config\/local.json'... \r\n\r\n Starting docker in background... \r\n\r\n Restoring data for ElasticSearch... \r\n\r\n Migrating data into ElasticSearch... \r\n\r\n Cloning Magento 2 Sample Data into 'var\/magento2-sample-data'... \r\n\r\n Starting backend server... \r\n\r\n Trying change directory to '\/home\/teddy\/Documents\/works\/vue-storefront'... \r\n\r\n Working in directory '\/home\/teddy\/Documents\/works\/vue-storefront'... \r\n\r\n Creating storefront config 'config\/local.json'... \r\n\r\n Build storefront npm... \r\n\r\n Starting storefront server... \r\n\r\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 Congratulations!                                          \u2502\r\n\u2502                                                           \u2502\r\n\u2502 You've just successfully installed vue-storefront.        \u2502\r\n\u2502 All required servers are running in background            \u2502\r\n\u2502                                                           \u2502\r\n\u2502 Storefront: http:\/\/localhost:3000                         \u2502\r\n\u2502 Backend: http:\/\/localhost:8080                            \u2502\r\n\u2502                                                           \u2502\r\n\u2502 Logs: \/home\/teddy\/Documents\/works\/vue-storefront\/var\/log\/ \u2502\r\n\u2502                                                           \u2502\r\n\u2502 Good Luck!                                                \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\r\n\r\nDone in 155.67s.<\/pre>\n<p>IF THE NODE JS SERVER IS STOPPED, START\/RESTART IT AGAIN BY RUNNING: &#8216;yarn dev&#8217; in &#8216;vue-storefront&#8217; directory and &#8216;vue-storefront-api&#8217; directory. Make sure nginx that use port 8080 is stopped (check port : sudo netstat -plntu)<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works\/vue-storefront$ yarn dev\r\nteddy@teddy:~\/Documents\/works\/vue-storefront-api$ yarn dev<\/pre>\n<p>Then to open the frontend (vue-storefront): http:\/\/localhost:3000\/ &#8211;&gt; OK. BUT WHEN I CLICK ANY LINK ON THE PRODUCT, I GOT &#8216;The product, category or CMS page is not available in Offline mode. Redirecting to Home.&#8217;<br \/>\nto open the backend (vue-storefront-api): http:\/\/localhost:8080\/ &#8211;&gt; NOT OK! I got this printed: Cannot GET \/<br \/>\nhttp:\/\/localhost:8080\/api &#8211;&gt; printed: {&#8220;version&#8221;:&#8221;0.1.0&#8243;}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ref: https:\/\/docs.vuestorefront.io\/guide\/installation\/linux-mac.html#requirements https:\/\/medium.com\/the-vue-storefront-journal\/vue-storefront-how-to-install-and-integrate-with-magento2-227767dd65b2 Requirements &#8211; Docker (with\u00a0docker-compose\u00a0installed). Already included in\u00a0vue-storefront\u00a0and\u00a0vue-storefront-api\u00a0Docker images (required locally, if you do not use containerization): &#8211; Node.js\u00a0Active LTS\u00a0(&gt;=8.0.0) teddy@teddy:~$ nvm use 10.15.1 Now using node v10.15.1 (npm v6.4.1) teddy@teddy:~$ node -v v10.15.1 &#8211; Yarn\u00a0(&gt;=1.0.0) teddy@teddy:~$ yarn -v 1.13.0 &#8211; ImageMagick\u00a0(to fit, resize and crop images) First, Install Docker CE for ubuntu &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2019\/02\/28\/install-vue-storefront-on-ubuntu-16-04\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Install Vue Storefront On Ubuntu 16.04&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39,98,71,13,17,78],"tags":[],"class_list":["post-3662","post","type-post","status-publish","format-standard","hentry","category-docker","category-magento-tutorial","category-magento","category-tutorial","category-ubuntu","category-ubuntu-16-04"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/3662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=3662"}],"version-history":[{"count":19,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/3662\/revisions"}],"predecessor-version":[{"id":3684,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/3662\/revisions\/3684"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=3662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=3662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=3662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}