Quick start of development work
An experience in setting up a Windows development environment
Table of contents
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.
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.
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
-
npm install --location=global pnpm pnpm -v # Set up store dir pnpm config set store-dir D:\dev-data\.pnpm-store
-
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).
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