diff --git a/installation.mdx b/installation.mdx index d195c937f..9460f9f56 100644 --- a/installation.mdx +++ b/installation.mdx @@ -23,23 +23,11 @@ icon: "terminal" Run the following command to install the [CLI](https://www.npmjs.com/package/mint): - - ```bash npm + ```bash npm i -g mint ``` - - ```bash yarn - yarn global add mint - ``` - - - ```bash pnpm - pnpm add -g mint - ``` - - Navigate to your docs directory (where your `docs.json` file is located) and execute the following command: @@ -54,24 +42,10 @@ icon: "terminal" Alternatively, if you do not want to install the CLI globally, you can run a one-time script: - - -```bash npm +```bash npx mint dev ``` - -```bash yarn -yarn dlx mint dev -``` - - -```bash pnpm -pnpm dlx mint dev -``` - - - ## Updates If your local preview is out of sync with what you see on the web in the production version, update your local CLI: @@ -82,24 +56,10 @@ mint update If this `mint update` command is not available on your local version, re-install the CLI with the latest version: - - -```bash npm +```bash npm i -g mint@latest ``` - -```bash yarn -yarn global upgrade mint -``` - - -```bash pnpm -pnpm up --global mint -``` - - - ## Custom ports By default, the CLI uses port 3000. You can customize the port using the `--port` flag. To run the CLI on port 3333, for instance, use this command: @@ -158,11 +118,39 @@ If you use JetBrains, we recommend the [MDX IntelliJ IDEA plugin](https://plugin This may be due to an outdated version of node. Try the following: - 1. Remove the currently-installed version of the mint CLI: `npm remove -g mint` + 1. Remove the currently-installed version of the mint CLI: `npm uninstall -g mint` 2. Upgrade to Node.js. 3. Reinstall the mint CLI: `npm install -g mint` - Solution: Go to the root of your device and delete the `~/.mintlify` folder. Afterwards, run `mint dev` again. + **Solution**: Go to the root of your device and delete the `~/.mintlify` folder. Afterwards, run `mint dev` again. + + + This is due to not having the required permissions to globally install node packages. + + **Solution**: Try running `sudo npm i -g mint`. You will be prompted for your password, which is the one you use to unlock your computer. + + + This is likely due to an outdated version of the CLI. + + **Solution:** Run `mint update` to get the latest changes. + + + If you have any problems with the CLI package, you should first run `npm ls -g`. This command shows what packages are globally installed on your machine. + + If you have a package named `mint` and a package named `mintlify` installed, you should uninstall `mintlify`. + + 1. Uninstall the old package: + ```bash + npm uninstall -g mintlify + ``` + 2. Clear your npm cache: + ```bash + npm cache clean --force + ``` + 3. Reinstall the new package: + ```bash + npm install -g mint + ```