docs: added troubleshooting section for cli tool (#2357)

This commit is contained in:
Shahed Nasser
2022-10-05 16:39:53 +03:00
committed by GitHub
parent 714a5a0bbe
commit 789263f94d
6 changed files with 71 additions and 1 deletions
@@ -0,0 +1,47 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Resolve Errors Installing Medusa CLI
In this document, you can find solutions to some common problems that occur when installing Medusas CLI Tool.
## NPM Error: EACCES Permissions Errors
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).
<!-- vale off -->
## Yarn Error: command not found: medusa
<!-- vale on -->
If you install the Medusa CLI tool with Yarn, then try to use the CLI tool but get the error:
```bash
command not found: medusa
```
You have to add Yarns install location to the PATH variable:
<Tabs groupId="operating-systems">
<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).