Skip to content

Commit a9c94f4

Browse files
committed
prerequisites updates
1 parent dc643d8 commit a9c94f4

File tree

1 file changed

+50
-18
lines changed
  • website/docs/getting-started/prerequisites

1 file changed

+50
-18
lines changed

website/docs/getting-started/prerequisites/index.mdx

Lines changed: 50 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,21 @@ removed 1 package, and changed 60 packages in 5s
128128
run `npm fund` for details
129129
```
130130

131-
Surprisingly, checking the version often reveals the older version:
131+
The next step is to check the version:
132+
133+
<CodeBlock language="txt"> {
134+
`C:\\>where npm.cmd
135+
C:\\>where npm.cmd
136+
C:\Program Files\nodejs\npm.cmd
137+
C:\Users\ilg\AppData\Roaming\npm\npm.cmd
138+
C:\\>npm --version
139+
${frontMatter.npm_latest_version}
140+
`} </CodeBlock>
141+
142+
<details>
143+
<summary>What to do if the update is not effective?</summary>
144+
145+
Surprisingly, checking the version may reveal the old version:
132146

133147
<CodeBlock language="txt"> {
134148
`C:\\>where npm.cmd
@@ -139,14 +153,15 @@ ${frontMatter.npm_version}
139153

140154
This happens because, by default, global Node.js packages on Windows
141155
are installed in the user home folder, specifically in `%APPDATA%\npm`
142-
(e.g., `C:\Users\ilg\AppData\Roaming\npm`). This path is not included
156+
(e.g., `C:\Users\ilg\AppData\Roaming\npm`). In older releases,
157+
this path was not included
143158
in the system or user path.
144159

145160
```txt
146161
C:\>echo %Path%
147162
```
148163

149-
It must be manually added **before** the current path:
164+
If this is the case, it must be manually added **before** the current path:
150165

151166
```txt
152167
C:\>set Path=%APPDATA%\npm;%Path%
@@ -179,6 +194,8 @@ After this, the new version of the program should be visible:
179194
${frontMatter.npm_latest_version}
180195
`} </CodeBlock>
181196

197+
<details>
198+
182199
<Heading as="h2">Git</Heading>
183200

184201
While not mandatory for using the xPack tools alone, it is recommended
@@ -493,6 +510,21 @@ sudo apt-get install --yes linux-headers-generic
493510

494511
</Tabs>
495512

513+
## Install xpm
514+
515+
[`xpm`](https://xpack.github.io/xpm/) is also a portable
516+
[Node.js](https://nodejs.org/) command line application.
517+
518+
On macOS and GNU/Linux, if you followed the _Quick instructions_,
519+
it is already installed. Otherwise, to install it, follow the steps in the
520+
[xpm install](https://xpack.github.io/xpm/install/) page.
521+
522+
If you're confident and prefer a shortcut,
523+
run the following command:
524+
525+
```sh
526+
npm install -location=global xpm@latest
527+
```
496528

497529
## Cleanups (node/npm)
498530

@@ -509,6 +541,11 @@ following two folders to install global packages:
509541
- `%APPDATA%\Roaming\npm`
510542
- `%APPDATA%\Local\npm-cache`
511543

544+
And **xpm** uses the following two folders:
545+
546+
- `%APPDATA%\Roaming\xPacks`
547+
- `%APPDATA%\Local\Caches\xPacks`
548+
512549
</TabItem>
513550

514551
<TabItem value="macos" label="macOS">
@@ -519,6 +556,11 @@ and **npm** utilise only two folders:
519556
- `$HOME/.nvm`
520557
- `$HOME/.cache/node`
521558

559+
And **xpm** uses the following two folders:
560+
561+
- `${HOME}/Library/xPacks`
562+
- `${HOME}/Library/Caches/xPacks`
563+
522564
</TabItem>
523565

524566
<TabItem value="linux" label="GNU/Linux">
@@ -529,25 +571,15 @@ and **npm** utilise only two folders:
529571
- `$HOME/.nvm`
530572
- `$HOME/.npm`
531573

532-
</TabItem>
574+
And **xpm** uses the following two folders:
533575

534-
</Tabs>
535-
536-
## Install xpm
537-
538-
[`xpm`](https://xpack.github.io/xpm/) is also a portable
539-
[Node.js](https://nodejs.org/) command line application.
576+
- `${HOME}/.local/xPacks`
577+
- `${HOME}/.cache/xPacks`
540578

541-
On macOS and GNU/Linux, if you followed the _Quick instructions_,
542-
it is already installed. Otherwise, to install it, follow the steps in the
543-
[xpm install](https://xpack.github.io/xpm/install/) page.
579+
</TabItem>
544580

545-
If you're confident and prefer a shortcut,
546-
run the following command:
581+
</Tabs>
547582

548-
```sh
549-
npm install -location=global xpm@latest
550-
```
551583

552584
## Miscellaneous
553585

0 commit comments

Comments
 (0)