Wednesday, 5 June 2024

Install Node and NPM on Windows using fnm version manager

 Background

In previous posts, we saw how to install node directly using the installer in Windows and on Linux using apt-get command. In this post, we will see how to use a package manager called fnm (Fast Node manager) on Windows.

Install Node and NPM on Windows using fnm package manager

  1. Open your PowerShell window
  2. Run command : winget install Schniz.fnm
    1. This will install the fnm version manager
  3. Before you use fnm you need to do a few terminal settings
    1. Run the command "new-item -type file -path $profile -force" to create your profile file.
    2. Then run the command "notepad $profile" to open your profile file.
    3. Add the below line to the opened Notepad file and save it
      1. fnm env --use-on-cd | Out-String | Invoke-Expression
  4. Once done you can install the node using the following command
    1. fnm use --install-if-missing 20
  5. Once run you can check the installation by running the following commands
    1. node -v
    2. npm -v





Related Links

No comments:

Post a Comment

t> UA-39527780-1 back to top