Home  >  Article  >  Web Front-end  >  nodejs installed by default

nodejs installed by default

WBOY
WBOYOriginal
2023-05-17 09:53:06410browse

Node.js is a JavaScript running environment built on the Chrome V8 engine, which can realize fast server-side application and script running. With Node.js being widely used in server-side development, many developers will want to know how to install Node.js. This article will introduce the default installation method of Node.js.

Node.js supports multiple operating system platforms, such as Windows, Mac OS X, Linux, BSD, etc. However, this article will mainly introduce the installation of Node.js on Windows.

First, you need to enter the official website of Node.js https://nodejs.org/, and then click the "Download" button. The official website of Node.js provides download links for the latest version and the LTS version. The LTS version refers to the long-term support version and is more stable than the latest version. Therefore, developers are recommended to choose the LTS version.

Next, you need to select the corresponding operating system version. If it is a Windows operating system, please select Windows Installer. Then double-click the downloaded installation package to install it. During the installation process, you need to pay attention to the following points:

  1. Installation path: You can customize the installation path, or use the default installation path.
  2. Add PATH: Node.js needs to be added to the system environment variable, otherwise the node command cannot be used on the command line. During the installation process, you need to check the "Automatically install the necessary tools" option, and the system will automatically add Node.js to the PATH.
  3. Install components: During the installation process, you can choose the components to install according to your own needs. Under normal circumstances, it is recommended to check the "npm package manager" option. This is the package management tool of Node.js, which can easily install, uninstall, update and manage Node.js dependent modules.
  4. After the installation is completed, you need to reopen the command line window to make the environment variables take effect.
  5. You can enter the "node -v" command on the command line to view the version information of Node.js. If a version number similar to "v14.16.0" appears, it means that Node.js is installed successfully.

In summary, installing Node.js is very simple. You only need to download the corresponding version of the installation package and install it according to the prompts. During the installation process, you need to pay attention to adding PATH and component selection. I hope this article can help you when installing Node.js.

The above is the detailed content of nodejs installed by default. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:nodejs set homepageNext article:nodejs set homepage