You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: installation.mdx
+33-45Lines changed: 33 additions & 45 deletions
Original file line number
Diff line number
Diff line change
@@ -23,23 +23,11 @@ icon: "terminal"
23
23
<Steps>
24
24
<Steptitle="Install the CLI.">
25
25
Run the following command to install the [CLI](https://www.npmjs.com/package/mint):
26
-
<CodeGroup>
27
26
28
-
```bash npm
27
+
```bash
29
28
npm i -g mint
30
29
```
31
30
32
-
33
-
```bash yarn
34
-
yarn global add mint
35
-
```
36
-
37
-
38
-
```bash pnpm
39
-
pnpm add -g mint
40
-
```
41
-
42
-
</CodeGroup>
43
31
</Step>
44
32
<Steptitle="Preview locally.">
45
33
Navigate to your docs directory (where your `docs.json` file is located) and execute the following command:
@@ -54,24 +42,10 @@ icon: "terminal"
54
42
55
43
Alternatively, if you do not want to install the CLI globally, you can run a one-time script:
56
44
57
-
<CodeGroup>
58
-
59
-
```bash npm
45
+
```bash
60
46
npx mint dev
61
47
```
62
48
63
-
64
-
```bash yarn
65
-
yarn dlx mint dev
66
-
```
67
-
68
-
69
-
```bash pnpm
70
-
pnpm dlx mint dev
71
-
```
72
-
73
-
</CodeGroup>
74
-
75
49
## Updates
76
50
77
51
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
82
56
83
57
If this `mint update` command is not available on your local version, re-install the CLI with the latest version:
84
58
85
-
<CodeGroup>
86
-
87
-
```bash npm
59
+
```bash
88
60
npm i -g mint@latest
89
61
```
90
62
91
-
92
-
```bash yarn
93
-
yarn global upgrade mint
94
-
```
95
-
96
-
97
-
```bash pnpm
98
-
pnpm up --global mint
99
-
```
100
-
101
-
</CodeGroup>
102
-
103
63
## Custom ports
104
64
105
65
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
158
118
<Accordiontitle='Error: Could not load the "sharp" module using the darwin-arm64 runtime'>
159
119
This may be due to an outdated version of node. Try the following:
160
120
161
-
1. Remove the currently-installed version of the mint CLI: `npm remove -g mint`
121
+
1. Remove the currently-installed version of the mint CLI: `npm uninstall -g mint`
162
122
2. Upgrade to Node.js.
163
123
3. Reinstall the mint CLI: `npm install -g mint`
164
124
</Accordion>
165
125
<Accordiontitle="Issue: Encountering an unknown error">
166
-
Solution: Go to the root of your device and delete the `~/.mintlify` folder. Afterwards, run `mint dev` again.
126
+
**Solution**: Go to the root of your device and delete the `~/.mintlify` folder. Afterwards, run `mint dev` again.
127
+
</Accordion>
128
+
<Accordiontitle="Error: permission denied">
129
+
This is due to not having the required permissions to globally install node packages.
130
+
131
+
**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.
132
+
</Accordion>
133
+
<Accordiontitle="The local preview doesn't look the same as my docs do on the web">
134
+
This is likely due to an outdated version of the CLI.
135
+
136
+
**Solution:** Run `mint update` to get the latest changes.
137
+
</Accordion>
138
+
<Accordiontitle="mintlify vs. mint package">
139
+
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.
140
+
141
+
If you have a package named `mint` and a package named `mintlify` installed, you should uninstall `mintlify`.
0 commit comments