nvm setup
Fluent UI Team edited this page Apr 9, 2022
·
2 revisions
We recommend using nvm
(Node Version Manager) to manage and switch Node versions. This is useful if you're developing in multiple repos and/or branches that have different Node version requirements.
First, uninstall your globally-installed version of Node.
The next steps vary by platform.
- Install
nvm-windows
- Redo setup for normal development:
- Install the latest LTS Node version. Unfortunately with
nvm-windows
you must manually specify the full version number.- Run
nvm list available
- Take note of the newest version in the
LTS
column -- for demo purposes we'll call itx.y.z
(you'll need to use the real version number instead) - Install that version:
nvm install x.y.z
- Run
- Reinstall yarn:
npm install -g yarn@1
- Optional: reinstall any other npm packages you previously had globally installed
- Install the latest LTS Node version. Unfortunately with
-
(Only if developing on an old branch) Install an old Node version for legacy branch development:
- Find the full 10.x or 8.x version number to install. One way is to look at the version number in the filenames on this page for 10.x or this page for 8.x. For demo purposes we'll call it
x.y.z
(you'll need to use the real version number instead). - Install that version:
nvm install x.y.z
- Find the full 10.x or 8.x version number to install. One way is to look at the version number in the filenames on this page for 10.x or this page for 8.x. For demo purposes we'll call it
- To switch between the Node versions later, run
nvm use x.y.z
wherex.y.z
is the full version number.- The selected version will remain the default until you select another version.
- If you forget which versions are installed, run
nvm list installed
.
- Install
nvm
- Redo setup for normal development:
- Install the latest LTS Node version:
nvm install lts
(ornvm install 14
if you prefer to stay on 14 for now) - Set that version as your default:
nvm alias default lts
- Reinstall yarn:
npm install -g yarn@1
- Optional: Reinstall any other packages you previously had globally installed
- Install the latest LTS Node version:
-
(Only if developing on an old branch) Install an old Node version for legacy branch development: either
nvm install 10
ornvm install 8
- When working in the old branch, run
nvm use 10
(ornvm use 8
) each time you open a new terminal (or you can temporarily change the default by runningnvm alias default 10
then changing it back later)
- FAQ - Fabric and Stardust to Fluent UI
-
@fluentui/react
Version 9 -
@fluentui/react
Version 8 - Contributing to the
7.0
branch - How to apply themes (version 7/8)
- Planning and development process (for work by the core team)
- Conducting meetings Style guide
- Keeping up with review requests
- RFC review process
- Setup (configuring your environment)
- Fluent UI React version 7/8
- CLA
- Overview
- Repo structure
- Development process
- Contributing to previous versions
- API Extractor
- Build command changes made in early 2020
- Component implementation guide
- Creating a component
- Implementation Best Practices
- Theming
- Documenting
- Styling (old approach)
- Overview
- Testing with Jest
- E2E testing (Cypress)
- Visual testing (Screener)
- Accessibility review checklist