From 7227c1539b294f6ca7fb8fdde1747240a04ac38e Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 13 Dec 2022 11:52:55 +0200 Subject: [PATCH] docs: added a note about using Yarn for installation (#2778) * docs: added a note about yarn being faster * docs: fixed env variable used in admin deployment guide * docs: fixed the use of noReport with npm2yarn --- docs/content/admin/quickstart.md | 10 ++++++++-- docs/content/advanced/backend/entities/index.md | 2 +- .../advanced/backend/services/create-service.md | 2 +- docs/content/deployments/admin/deploying-on-netlify.md | 8 ++++++-- docs/content/quickstart/quick-start.md | 8 +++++++- docs/content/starters/gatsby-medusa-starter.md | 6 ++++++ docs/content/starters/nextjs-medusa-starter.md | 6 ++++++ .../troubleshooting/transaction-error-in-checkout.md | 2 +- .../tutorial/0-set-up-your-development-environment.mdx | 2 +- 9 files changed, 37 insertions(+), 9 deletions(-) diff --git a/docs/content/admin/quickstart.md b/docs/content/admin/quickstart.md index ac349b65ad..608e7f395c 100644 --- a/docs/content/admin/quickstart.md +++ b/docs/content/admin/quickstart.md @@ -34,6 +34,12 @@ Instead of manually following this guide to install then later deploy the Medusa ## Install the Admin +:::tip + +It is recommended to use [Yarn](https://yarnpkg.com/getting-started/install) for the installation process as it's much faster than using NPM. + +::: + Start by cloning the [Admin GitHub repository](https://github.com/medusajs/admin) and changing to the cloned directory: ```bash @@ -55,7 +61,7 @@ Before running your Medusa admin, make sure that your Medusa server is running. To run your Medusa server, go to the directory holding the server and run: -```bash npm2yarn noReport +```bash npm2yarn npm run start ``` @@ -77,7 +83,7 @@ Use your Medusa admin’s user credentials to log in. If you installed the demo data when you installed the Medusa server by using the `--seed` option or running: -```bash npm2yarn noReport +```bash npm2yarn npm run seed ``` diff --git a/docs/content/advanced/backend/entities/index.md b/docs/content/advanced/backend/entities/index.md index 742ce1031d..89d63127e6 100644 --- a/docs/content/advanced/backend/entities/index.md +++ b/docs/content/advanced/backend/entities/index.md @@ -75,7 +75,7 @@ Be careful with your file names as it can cause unclear errors in Typeorm. Make Before trying this step make sure that you’ve created and run your migrations. You also need to re-build your code using: -```bash npm2yarn noReport +```bash npm2yarn npm run build ``` diff --git a/docs/content/advanced/backend/services/create-service.md b/docs/content/advanced/backend/services/create-service.md index ab905bc69f..3b521eed30 100644 --- a/docs/content/advanced/backend/services/create-service.md +++ b/docs/content/advanced/backend/services/create-service.md @@ -54,7 +54,7 @@ In this section, you'll learn how to use services throughout your Medusa server. Before using your service, make sure you run the `build` command: -```bash npm2yarn noReport +```bash npm2yarn npm run build ``` diff --git a/docs/content/deployments/admin/deploying-on-netlify.md b/docs/content/deployments/admin/deploying-on-netlify.md index 2ce0ac4e29..29b5a0185e 100644 --- a/docs/content/deployments/admin/deploying-on-netlify.md +++ b/docs/content/deployments/admin/deploying-on-netlify.md @@ -113,7 +113,7 @@ Next, click the “Show advanced” button, which is above the “Deploy site” Under the “Advanced build settings” section click on the “New variable” button. This will show two inputs for the key and value of the environment variable. -For the first field enter the key `GATSBY_MEDUSA_BACKEND_URL` and for the value enter the URL of your Medusa server. +For the first field enter the key `MEDUSA_BACKEND_URL` and for the value enter the URL of your Medusa server. :::caution @@ -121,7 +121,11 @@ If you haven’t deployed your Medusa server yet, you can leave the value blank ::: -![Environment Variable](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001898/Medusa%20Docs/Netlify/DnutZfT_rv8iel.png) +:::note + +In previous versions of the admin, the environment variable name was `GATSBY_MEDUSA_BACKEND_URL` or `GATSBY_STORE_URL` instead. The admin remains backwards compatible, so if you've used this an older version you can keep the same environment variables. However, it's highly recommended you change it to `MEDUSA_BACKEND_URL`. + +::: Once you’re done, scroll down and click on Deploy site. diff --git a/docs/content/quickstart/quick-start.md b/docs/content/quickstart/quick-start.md index 144a22ed8f..2b08d692c5 100644 --- a/docs/content/quickstart/quick-start.md +++ b/docs/content/quickstart/quick-start.md @@ -14,9 +14,15 @@ You can install Node from the [official website](https://nodejs.org/en/). ## Create a Medusa Server +:::tip + +It is recommended to use [Yarn](https://yarnpkg.com/getting-started/install) for the installation process as it's much faster than using NPM. + +::: + ### 1. Install Medusa CLI - ```bash npm2yarn noReport + ```bash npm2yarn npm install @medusajs/medusa-cli -g ``` diff --git a/docs/content/starters/gatsby-medusa-starter.md b/docs/content/starters/gatsby-medusa-starter.md index 94bdfe0ff0..20d3f8896c 100644 --- a/docs/content/starters/gatsby-medusa-starter.md +++ b/docs/content/starters/gatsby-medusa-starter.md @@ -24,6 +24,12 @@ npm install gatsby-cli -g ## Installation +:::tip + +It is recommended to use [Yarn](https://yarnpkg.com/getting-started/install) for the installation process as it's much faster than using NPM. + +::: + 1\. Create a new Gatsby project using the [Medusa starter template](https://github.com/medusajs/gatsby-starter-medusa): ```bash diff --git a/docs/content/starters/nextjs-medusa-starter.md b/docs/content/starters/nextjs-medusa-starter.md index cee432527c..2d07d06452 100644 --- a/docs/content/starters/nextjs-medusa-starter.md +++ b/docs/content/starters/nextjs-medusa-starter.md @@ -18,6 +18,12 @@ This document assumes you already have a Medusa server installed. If you don’t ## Installation +:::tip + +It is recommended to use [Yarn](https://yarnpkg.com/getting-started/install) for the installation process as it's much faster than using NPM. + +::: + 1\. Create a new Next.js project using the [Medusa starter template](https://github.com/medusajs/nextjs-starter-medusa): ```bash diff --git a/docs/content/troubleshooting/transaction-error-in-checkout.md b/docs/content/troubleshooting/transaction-error-in-checkout.md index 3aa704a0a5..6830f67d24 100644 --- a/docs/content/troubleshooting/transaction-error-in-checkout.md +++ b/docs/content/troubleshooting/transaction-error-in-checkout.md @@ -46,7 +46,7 @@ medusa migrations run If you want to add demo data into your server, you should also seed the database using the following command: -```bash npm2yarn noReport +```bash npm2yarn npm run seed ``` diff --git a/docs/content/tutorial/0-set-up-your-development-environment.mdx b/docs/content/tutorial/0-set-up-your-development-environment.mdx index f98695fa7f..40cc068c55 100644 --- a/docs/content/tutorial/0-set-up-your-development-environment.mdx +++ b/docs/content/tutorial/0-set-up-your-development-environment.mdx @@ -123,7 +123,7 @@ The final installation required to get started with Medusa is the Medusa CLI. It You can install Medusa’s CLI with the following command: -```bash npm2yarn noReport +```bash npm2yarn npm install @medusajs/medusa-cli -g ```