docs: added troubleshooting component (#4255)

This commit is contained in:
Shahed Nasser
2023-06-06 15:18:23 +03:00
committed by GitHub
parent 926e284bac
commit b1c63c5476
64 changed files with 607 additions and 257 deletions

View File

@@ -0,0 +1,3 @@
If you install the Medusa CLI tool with NPM and get a permission error, NPM proposes as a solution either re-installing NPM with a node version manager (nvm), or manually setting npms default directory.
You can check out more information in [NPMs documentation](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally).

View File

@@ -0,0 +1,7 @@
If you're using Powershell and you installed the CLI tool, but when you try to use it you get the error:
```bash noReport
command not found: medusa
```
Try closing your Powershell window and opening a new one.

View File

@@ -0,0 +1,21 @@
import Troubleshooting from '@site/src/components/Troubleshooting'
import PermissionErrorsSection from './_permission-errors.md'
import PowershellErrorSection from './_powershell-error.md'
import YarnErrorSection from './_yarn-error.mdx'
<Troubleshooting
sections={[
{
title: "NPM Error: EACCES Permissions Errors",
content: <PermissionErrorsSection />
},
{
title: "Powershell Error: command not found: medusa",
content: <PowershellErrorSection />
},
{
title: "Yarn Error: command not found: medusa",
content: <YarnErrorSection />
}
]}
/>

View File

@@ -0,0 +1,31 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
If you install the Medusa CLI tool with Yarn, then try to use the CLI tool but get the error:
```bash noReport
command not found: medusa
```
You have to add Yarns install location to the PATH variable:
<Tabs groupId="operating-systems" isCodeTabs={true}>
<TabItem value="unix" label="MacOS / Linux" default>
```bash
export PATH="$(yarn global bin):$PATH"
```
</TabItem>
<TabItem value="windows" label="Windows">
```bash
# MAKE SURE TO INCLUDE %path%
setx path "%path%;c:\users\YOURUSERNAME\appdata\local\yarn\bin"
# YOURUSERNAME is your account username
```
</TabItem>
</Tabs>
You can learn more in [Yarns documentation](https://classic.yarnpkg.com/en/docs/cli/global#adding-the-install-location-to-your-path).