- Download nvm install from https://github.com/coreybutler/nvm-windows/releases/download/1.1.7/nvm-setup.zip
cd %USERPROFILE%\Downloads
jar xf nvm-setup.zip
cd nvm-setup
nvm-setup.exe
# input install path in wizard as
# for nvm C:\Users\rajesh.pradeshik\programs\nvm
# for nodejs C:\Users\rajesh.pradeshik\programs\nodejs
# open new prompt and test
nvm version
# installing 8.11.3, setting it to use as default, check if npm_modules are installed, if not getting npm manually
nvm install 8.11.3
nvm use 8.11.3
node -v
# It is npm -v gives error, since nvm install fails to install NPM package/bin alone
npm -v
#will give error, continue as follows to fix
# download into %USERPROFILE%\Downloads from https://nodejs.org/dist/v8.11.3/node-v8.11.3-win-x64.zip
node -v > temp.txt
set /p INSTALL_NODE_VNUM=<temp.txt
echo %INSTALL_NODE_VNUM%
cd %USERPROFILE%\Downloads
jar xf node-%INSTALL_NODE_VNUM%-win-x64.zip
xcopy %USERPROFILE%\Downloads\node-%INSTALL_NODE_VNUM%-win-x64\*.* %NVM_HOME%\%INSTALL_NODE_VNUM% /K /D /H /Y /S /E
#now test both node and npm
node -v
npm -v
# Run required packages for our project
npm install -g @angular/cli@6.0.8 rimraf@2.6.2 xvfb-maybe@0.2.1 typescript
# if you want to make 8.11.3 as default you can use as
nvm alias default 8.11.3