
Changes to tutorial documentation: 1. Changed instances of `yarn` to `npm`. Remove references to installing `yarn`. 2. Changed instances of `@freesewing/new-design` to `@freesewing/studio`. 3. Changed instances of "lab" to "development environment" and `npm run lab` to `npm run org`. 4. Changed instances of Node v18.17.0 to v20.19.1. ~(I think I might have missed it in one spot. I'll submit a future PR for it.)~ I did not touch the Getting "Started with Vercel" and "Getting Started with Codespaces" tutorials. I need to take a closer look at these to see if they are still relevant or if we might want to remove them. Co-authored-by: Benjamin Fan <ben-git@swinglonga.com> Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/278 Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org> Co-authored-by: Benjamin Fan <benjamesben@noreply.codeberg.org> Co-committed-by: Benjamin Fan <benjamesben@noreply.codeberg.org>
54 lines
1.3 KiB
Text
54 lines
1.3 KiB
Text
---
|
|
title: Using a different Node.js version
|
|
sidebar_position: 30
|
|
---
|
|
|
|
Now that you've got Node.js setup, we can start setting up the FreeSewing
|
|
development environment.
|
|
|
|
But before doing so, let's look at how `nvm` can help you juggle different
|
|
Node.js versions.
|
|
|
|
### nvm ls
|
|
|
|
To see the different Node.js versions on your system, run this command:
|
|
|
|
```bash
|
|
nvm ls
|
|
```
|
|
|
|
It will show you a list of local Node.js versions,
|
|
either the version number or an _alias_ that points to a specific version.
|
|
You should see the `lts/*` alias in the list which is what we've just installed.
|
|
|
|
### nvm ls-remote
|
|
|
|
To see all Node.js versions that are available, not just those you have locally,
|
|
run this command:
|
|
|
|
```bash
|
|
nvm ls-remote
|
|
```
|
|
|
|
It will spit out a long list of Node.js versions that you can install.
|
|
|
|
### nvm install
|
|
|
|
For any of these versions, either local or remote, you can install them
|
|
by making a note of the version or alias and running this command:
|
|
|
|
```bash
|
|
nvm install <version-or-alias>
|
|
```
|
|
|
|
### nvm use
|
|
|
|
With multiple Node.js versions installed, `nvm` allows you to switch between different
|
|
versions. Just tell it which version you want to use:
|
|
|
|
```bash
|
|
nvm use lts/iron
|
|
```
|
|
|
|
If you picked a version that is not installed, `nvm` will simply tell you
|
|
and even suggest the command you should type to install it. Handy!
|