Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

itp: js1: install node: adjust nvm instructions for mac os #1200

Merged
merged 4 commits into from
Nov 19, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
bazmurphy marked this conversation as resolved.
Show resolved Hide resolved

```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
bazmurphy marked this conversation as resolved.
Show resolved Hide resolved

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

3. Install nvm by running the following command in your terminal:
bazmurphy marked this conversation as resolved.
Show resolved Hide resolved

```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
Loading