Edward Chen
Edward Chen's Blog

Edward Chen's Blog

Quick start of development work

Quick start of development work

An experience in setting up a Windows development environment

Edward Chen's photo
Edward Chen
·Jul 16, 2022·

2 min read

Table of contents

  • Node.js
  • Common global NPM Packages
  • JDK
  • Software Official Website

Node.js

We usually do not install node.js directly instead of managing it with NVM (Node Version Manager). NVM has a different implementation on different platforms. Windows' implementation is here, and Linux's one is here.

Take Windows as an example. After installing NVM, you can execute the command nvm to get all available usages.

image.png

For Chinese users, you'd better set up the node mirror of Alibaba to speed up the node.

nvm node_mirror https://npmmirror.com/mirrors/node
nvm npm_mirror https://npmmirror.com/mirrors/npm

Then list all available node versions with the command nvm list available. We recommend installing LTS (Long Term Support) version.

image.png

Then you can install what version you want. Execute the following commands.

nvm install 16  # Auto install the latest node.js, which's major version is 16
nvm use 16.16.0  # In my case, the newest version is 16.16.0

Validate your installation.

node -v
npm -v

Common global NPM Packages

For Chinese users, the first step is to set up an NPM mirror of Alibaba.

npm config set registry http://registry.npmmirror.com
  • pnpm

    npm install --location=global pnpm
    pnpm -v
    # Set up store dir
    pnpm config set store-dir D:\dev-data\.pnpm-store
    
  • antfu/ni

    npm install --location=global @antfu/ni
    

JDK

View the article Download Oracle JDK Without login and install JDK and JRE in the specified directory such as D:\dev-app\jdk\jdk1.8.0_333\ and D:\dev-app\jdk\jre1.8.0_333.

Create or update the system variable JAVA_HOME and set its value as D:\dev-app\jdk\jdk1.8.0_333\ (The directory where you installed the JDK).

image.png

The add a record %JAVA_HOME%\bin in the system variable path.

Open a new terminal and check the Java version.

java -version
javac -version
javap -version

Software Official Website

 
Share this