Skip to content

Commit

Permalink
itp: js1: install node: adjust nvm instructions for mac os (#1200)
Browse files Browse the repository at this point in the history
  • Loading branch information
bazmurphy authored Nov 19, 2024
1 parent 59c13e0 commit 039beaa
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions common-content/en/module/js1/install-node/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Check if you already have NodeJS installed by running `node -v` in a terminal. T
1. Install nvm by running the following commands in your terminal:

```terminal
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
```

2. After the installation is complete, you'll need to source the nvm script by running:
Expand All @@ -46,51 +46,65 @@ nvm install --lts
node -v
```

You should see a version number like `v20.16.0`.
You should see a version number like `v22.11.0`.

5. Check that you have successfully installed npm by running:

```terminal
npm -v
```

You should see a version number like `10.5.0`.
You should see a version number like `10.9.0`.

##  On Mac

1. Install nvm by running the following command in your terminal:
1. Install the the Xcode Command Line Developer Tools by running the following command in your terminal:

```terminal
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
xcode-select --install
```

2. After the installation is complete, you'll need to source the nvm script by running:
These may already be installed, in which case you will see "xcode-select: note: Command line tools are already installed." and can continue to the next step.

2. Create a (Non-Login Interactive) Shell Configuration File:

```terminal
touch ~/.zshrc
```

3. Install nvm:

```terminal
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
```

4. After the installation is complete, you'll need to source the nvm script by running:

```terminal
source ~/.zshrc
```

3. Install the latest LTS version of Node.js by running:
5. Install the latest LTS version of Node.js by running:

```terminal
nvm install --lts
```

4. Check that you have successfully installed Node.js by running:
6. Check that you have successfully installed Node.js by running:

```terminal
node -v
```

You should see a version number like `v20.16.0`.
You should see a version number like `v22.11.0`.

5. Check that you have successfully installed npm by running:
7. Check that you have successfully installed npm by running:

```terminal
npm -v
```

You should see a version number like `10.5.0`.
You should see a version number like `10.9.0`.

{{<note type="tip" title="Protip">}}
Using nvm allows you to easily install and manage multiple versions of Node.js on your system. This will help you access projects that use older versions of Node.js.
Expand Down

0 comments on commit 039beaa

Please sign in to comment.