Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install node.js in win system

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to install node.js in the win system, the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

1.nodejs download address: nodejs.org

two。 Install nodejs

Node.js runtime represents the running environment

Npm package manager stands for npm package manager

Online documentation shortcuts online document shortcut

Add to PATH added to environment variable

3. Verify the installation

(1) win+R > cmd

(2)

Verify nodejs version: node-v check npm version: npm-v

4. Modify the global path or npm cache path of package (optional)

Npm root-g

(1) View the global path or npm cache path of package

(2) modify: add node_cache and node_global folders under the nodejs installation directory

Npm config set prefix "D:\ node\ node\ node_global" npm config set cache "D:\ node\ node\ node_cache" / / here is your own path

Re-enter npm root-g has been modified successfully

5. Install vue package verification path

(1) install Vue first

Npm install-g vue

(2) View folders

6. Reconfigure environment variables

Because we have changed the storage path and cache path of the npm global module, we need to reconfigure the environment variables, otherwise there will be errors at the end of this article

(1) modify the user path variable to change the path to D:\ node\ node\ node_global

(2) create a new system variable: variable name: NODE_PATH

Variable value: d:\ node\ node\ node_global\ node_modules

(3) add% NODE_PATH% to the system path variable

7. Verify that the configuration is successful

(1) node opens the interactive interface

Input: require ('vue')

The following interface will be configured correctly

The environment variables are misconfigured when the following interface appears

On how to install node.js in the win system to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report