Before testing Node.js applications in a local development environment, you must prepare the development environment. This topic describes how to configure a Node.js development environment. It also provides download links for related tools.
- Open a directory where a Node.js installation package such as node-v10.16.3-linux-x64.tar.xz
resides, and use the following command to extract all files from the installation
package to the /usr/local directory.
sudo tar -C /usr/local -xzf node-v10.16.3-linux-x64.tar.xz
- Use the following command to create a symbolic link named /usr/local/node and point to the directory to which the installation package is extracted.
sudo ln -s /usr/local/node-v10.16.3-linux-x64 /usr/local/node
- Add the directory where the executable file resides to the Path environment variable. Add the following command to the $HOME/.profile file.
- Use the following command to apply the environment variablec changes.
- Use the following command to verify the installation of Node.js.
node --version && npm --versionA successful installation is indicated if the following results appear.
brew update && brew install go
Open the directory where the Node.js installation package resides and run the .msi file to install the package. No extra configuration is required.