Setup Multiple Node.JS using NVM and Issue

NVM is a Node Version Manager for Windows. It is used to set up multiple installations of Node.js on the window machine.

Before getting started with NVM you need download NVM for Windows from here.

Open Command prompt or Powershell in Administrator mode and run below command from development or project folder:

$ nvm install
$ nvm use


Once you run above command you may get an error a message like "Invalid version" or it will not work as you are expecting.

Then add  $(type .nvmrc)  at the end of the above command for example:

$ nvm install $(type .nvmc)


Now It will work as you expecting or again you will get an error message as below:

bash: type: .nvmrc: not found
Invalid version.

OR

$(type.0.0
Node.js v$(type.0.0 is only available in 32-bit.

OR something like below screenshot:
OR you may get below error message:
To get rid of this issue follow the below steps:
  1. If you already installed the Node.js version, then you need to uninstall it. Make sure you completely removed it from the windows. Read this How to completely remove node.js from Windows from here
  2. Download both nvm-noinstall.zip and nvm-setup.zip form here.
  3. Extract and execute nvm-noinstall.zip first.
  4. Extract and execute nvm-setup.zip.
  5. Start power shell or command prompt as administrator to use “nvm install and nvm use” commands, you will get below result:

For more details and reference: https://github.com/coreybutler/nvm-windows.

Happy Sitecoreing  😊

Comments

Popular posts from this blog

Sitecore Installation Error: Failed to Start Service 'Sitecore Marketing Automation Engine'

Import CSV Data in Sitecore Using PowerShell: Part-3

Sitecore : The database principal owns a schema in the database, and cannot be dropped message